mirror of https://github.com/istio/istio.io.git
fix open telemetry doc (#11732)
* fix OpenTelemetry doc * replace istio.io/istio for test * fix cleanup_otel_sample * update test reference Signed-off-by: hejianpeng <hejianpeng2@huawei.com> * fix gen Signed-off-by: hejianpeng <hejianpeng2@huawei.com> * fix otel-provider * remove extra changes in the go.* Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
This commit is contained in:
parent
afde10b1bb
commit
4830422f75
|
|
@ -21,5 +21,5 @@
|
|||
####################################################################################################
|
||||
|
||||
bpsnip_start_otel_collector_service__1() {
|
||||
kubectl apply -f samples/open-telemetry/otel.yaml
|
||||
kubectl apply -f samples/open-telemetry/otel.yaml -n istio-system
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@
|
|||
* Start the [otel-collector]({{< github_tree >}}/samples/open-telemetry) sample.
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f @samples/open-telemetry/otel.yaml@
|
||||
$ kubectl apply -f @samples/open-telemetry/otel.yaml@ -n istio-system
|
||||
{{< /text >}}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Edit `MeshConfig` to add an OpenTelemetry provider, named `otel`. This involves
|
|||
extensionProviders:
|
||||
- name: otel
|
||||
envoyOtelAls:
|
||||
service: otel-collector.istio-system.svc.cluster.local
|
||||
service: opentelemetry-collector.istio-system.svc.cluster.local
|
||||
port: 4317
|
||||
{{< /text >}}
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ data:
|
|||
extensionProviders:
|
||||
- name: otel
|
||||
envoyOtelAls:
|
||||
service: otel-collector.istio-system.svc.cluster.local
|
||||
service: opentelemetry-collector.istio-system.svc.cluster.local
|
||||
port: 4317
|
||||
rootNamespace: istio-system
|
||||
trustDomain: cluster.local
|
||||
|
|
@ -94,7 +94,7 @@ spec:
|
|||
extensionProviders:
|
||||
- name: otel
|
||||
envoyOtelAls:
|
||||
service: otel-collector.istio-system.svc.cluster.local
|
||||
service: opentelemetry-collector.istio-system.svc.cluster.local
|
||||
port: 4317
|
||||
defaultProviders:
|
||||
accessLogging:
|
||||
|
|
@ -169,7 +169,7 @@ The following table shows an example using the default access log format for a r
|
|||
1. Check `otel-collector`'s log:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl logs -l app=otel-collector -n istio-system
|
||||
$ kubectl logs -l app=opentelemetry-collector -n istio-system
|
||||
[2020-11-25T21:26:18.409Z] "GET /status/418 HTTP/1.1" 418 - via_upstream - "-" 0 135 3 1 "-" "curl/7.73.0-DEV" "84961386-6d84-929d-98bd-c5aee93b5c88" "httpbin:8000" "127.0.0.1:80" inbound|8000|| 127.0.0.1:41854 10.44.1.27:80 10.44.1.23:37652 outbound_.8000_._.httpbin.foo.svc.cluster.local default
|
||||
{{< /text >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ source "content/en/boilerplates/snips/start-otel-collector-service.sh"
|
|||
extensionProviders:
|
||||
- name: otel
|
||||
envoyOtelAls:
|
||||
service: otel-collector.istio-system.svc.cluster.local
|
||||
service: opentelemetry-collector.istio-system.svc.cluster.local
|
||||
port: 4317
|
||||
ENDSNIP
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ data:
|
|||
extensionProviders:
|
||||
- name: otel
|
||||
envoyOtelAls:
|
||||
service: otel-collector.istio-system.svc.cluster.local
|
||||
service: opentelemetry-collector.istio-system.svc.cluster.local
|
||||
port: 4317
|
||||
rootNamespace: istio-system
|
||||
trustDomain: cluster.local
|
||||
|
|
@ -80,7 +80,7 @@ spec:
|
|||
extensionProviders:
|
||||
- name: otel
|
||||
envoyOtelAls:
|
||||
service: otel-collector.istio-system.svc.cluster.local
|
||||
service: opentelemetry-collector.istio-system.svc.cluster.local
|
||||
port: 4317
|
||||
defaultProviders:
|
||||
accessLogging:
|
||||
|
|
@ -115,7 +115,7 @@ kubectl exec "$SOURCE_POD" -c sleep -- curl -sS -v httpbin:8000/status/418
|
|||
ENDSNIP
|
||||
|
||||
snip_test_the_access_log_2() {
|
||||
kubectl logs -l app=otel-collector -n istio-system
|
||||
kubectl logs -l app=opentelemetry-collector -n istio-system
|
||||
}
|
||||
|
||||
! read -r -d '' snip_test_the_access_log_2_out <<\ENDSNIP
|
||||
|
|
|
|||
6
go.mod
6
go.mod
|
|
@ -11,7 +11,7 @@ replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.5
|
|||
require (
|
||||
github.com/golang/sync v0.0.0-20180314180146-1d60e4601c6f
|
||||
github.com/pmezard/go-difflib v1.0.0
|
||||
istio.io/istio v0.0.0-20220819144046-eda724aef4c7
|
||||
istio.io/istio v0.0.0-20220826204218-8f0fc3e2d673
|
||||
istio.io/pkg v0.0.0-20220815202617-8f42645c6e49
|
||||
k8s.io/apimachinery v0.24.2
|
||||
k8s.io/client-go v0.24.2
|
||||
|
|
@ -210,8 +210,8 @@ require (
|
|||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
helm.sh/helm/v3 v3.9.0 // indirect
|
||||
istio.io/api v0.0.0-20220815202418-f02078d1ed7d // indirect
|
||||
istio.io/client-go v1.15.0-beta.0.0.20220815203017-44c6a759f531 // indirect
|
||||
istio.io/api v0.0.0-20220826132550-04f2b20dc284 // indirect
|
||||
istio.io/client-go v1.15.0-beta.1.0.20220826132951-9dfd19c7a2a0 // indirect
|
||||
k8s.io/api v0.24.2 // indirect
|
||||
k8s.io/apiextensions-apiserver v0.24.2 // indirect
|
||||
k8s.io/apiserver v0.24.2 // indirect
|
||||
|
|
|
|||
14
go.sum
14
go.sum
|
|
@ -3200,12 +3200,12 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
|
|||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY=
|
||||
istio.io/api v0.0.0-20220815202418-f02078d1ed7d h1:UNmy9Tmvbgpsugu993EStXPOIybRW8RefaBnAuwN+do=
|
||||
istio.io/api v0.0.0-20220815202418-f02078d1ed7d/go.mod h1:hQkF0Q19MCmfOTre/Sg4KvrwwETq45oaFplnBm2p4j8=
|
||||
istio.io/client-go v1.15.0-beta.0.0.20220815203017-44c6a759f531 h1:WsK2tQ7D2anbZbF2VGn1JCsVruG+AjccEVB6VKqwq7s=
|
||||
istio.io/client-go v1.15.0-beta.0.0.20220815203017-44c6a759f531/go.mod h1:DB3kGRjhe7Lx4Zw9kTXhaFJtMlTKM7o0Rrlnl3CaIqg=
|
||||
istio.io/istio v0.0.0-20220819144046-eda724aef4c7 h1:y46Rf8bTcbzL467zA1PUvAObbLgcBGOqkPjkPhQ9DwQ=
|
||||
istio.io/istio v0.0.0-20220819144046-eda724aef4c7/go.mod h1:xYCvAm7pmGIi+iI1IylrbeR3nAREy6w2DyPrD8TSrlA=
|
||||
istio.io/api v0.0.0-20220826132550-04f2b20dc284 h1:V1i4YF4zqlfrp6hlAweThW1XuDtgUWyDVcndX7FxB3U=
|
||||
istio.io/api v0.0.0-20220826132550-04f2b20dc284/go.mod h1:hQkF0Q19MCmfOTre/Sg4KvrwwETq45oaFplnBm2p4j8=
|
||||
istio.io/client-go v1.15.0-beta.1.0.20220826132951-9dfd19c7a2a0 h1:GSm2hZ8JoDDBypyWkCdh4UIVHyE3jM3Nw3B+MzS/biM=
|
||||
istio.io/client-go v1.15.0-beta.1.0.20220826132951-9dfd19c7a2a0/go.mod h1:EqbbL+90VpmUbedJTv0nG0v/ulk32cVTKKjZsG7UYqM=
|
||||
istio.io/istio v0.0.0-20220826204218-8f0fc3e2d673 h1:yfVjMD2B5EObRpRjqMrRXN5xH0PvQbDeE+/bhDEjd1A=
|
||||
istio.io/istio v0.0.0-20220826204218-8f0fc3e2d673/go.mod h1:tsGtNnps8oWEagCnOQ6gBgeQhpZf1J6KVNrKihaPrW0=
|
||||
istio.io/pkg v0.0.0-20220815202617-8f42645c6e49 h1:5KHbyoZ4Jzrb/gucGsjSkI/aPNeIHvmaAoCCctB9uJc=
|
||||
istio.io/pkg v0.0.0-20220815202617-8f42645c6e49/go.mod h1:kcBYN5TiyGFM2bs4b7K81j+YeDZ4JrINP+brV9ehZe0=
|
||||
k8s.io/api v0.0.0-20180904230853-4e7be11eab3f/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
|
||||
|
|
@ -3424,4 +3424,4 @@ sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
|||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
|
||||
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
|
||||
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
|
||||
sourcegraph.com/sqs/pbtypes v1.0.0/go.mod h1:3AciMUv4qUuRHRHhOG4TZOB+72GdPVz5k+c648qsFS4=
|
||||
sourcegraph.com/sqs/pbtypes v1.0.0/go.mod h1:3AciMUv4qUuRHRHhOG4TZOB+72GdPVz5k+c648qsFS4=
|
||||
|
|
@ -55,12 +55,12 @@ cleanup_httpbin_sample() {
|
|||
}
|
||||
|
||||
startup_otel_sample() {
|
||||
kubectl apply -f samples/open-telemetry/otel.yaml
|
||||
_wait_for_deployment istio-system otel-collector
|
||||
kubectl apply -f samples/open-telemetry/otel.yaml -n istio-system
|
||||
_wait_for_deployment istio-system opentelemetry-collector
|
||||
}
|
||||
|
||||
cleanup_otel_sample() {
|
||||
kubectl delete -f samples/open-telemetry/otel.yaml || true
|
||||
kubectl delete -f samples/open-telemetry/otel.yaml -n istio-system --ignore-not-found
|
||||
}
|
||||
|
||||
# Use curl to send an http request to a sample service via ingressgateway.
|
||||
|
|
|
|||
Loading…
Reference in New Issue