Distributed tracing OpenShift Container Platform 4.7 Distributed tracing installation, usage, and release notes Red Hat OpenShift Documentation Team

Commands:
spec: mode: deployment config: | exporters: jaeger: endpoint: jaeger-production-collector-headless.tracing-system.svc:14250 ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
spec: mode: deployment config: | exporters: jaeger: endpoint: jaeger-production-collector-headless.tracing-system.svc:14250 tls: ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
level: warn
ts: 1642438880.918793
caller: channelz/logging.go:62
msg: [core]grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams received bogus greeting from client: \"\\x16\\x03\\x01\\x02\\x00\\x01\\x00\\x01\\xfc\\x03\\x03vw\\x1a\\xc9T\\xe7\\xdaCj\\xb7\\x8dK\\xa6\""
system: grpc
grpc_log: yes
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: MyConfigFile spec: strategy: production 1
oc login --username=<NAMEOFUSER> https://<HOSTNAME>:8443
oc new-project tracing-system
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: jaeger-all-in-one-inmemory
oc create -n tracing-system -f jaeger.yaml
oc get pods -n tracing-system -w
NAME READY STATUS RESTARTS AGE jaeger-all-in-one-inmemory-cdff7897b-qhfdx 2/2 Running 0 24s
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: jaeger-production namespace: spec: strategy: production ingress: security: oauth-proxy storage: type: elasticsearch elasticsearch: nodeCount: 3 redundancyPolicy: SingleRedundancy esIndexCleaner: enabled: true numberOfDays: 7 schedule: 55 23 * * * esRollover: schedule: '*/30 * * * *'
oc login --username=<NAMEOFUSER> https://<HOSTNAME>:8443
oc new-project tracing-system
oc create -n tracing-system -f jaeger-production.yaml
oc get pods -n tracing-system -w
NAME READY STATUS RESTARTS AGE elasticsearch-cdm-jaegersystemjaegerproduction-1-6676cf568gwhlw 2/2 Running 0 10m elasticsearch-cdm-jaegersystemjaegerproduction-2-bcd4c8bf5l6g6w 2/2 Running 0 10m elasticsearch-cdm-jaegersystemjaegerproduction-3-844d6d9694hhst 2/2 Running 0 10m jaeger-production-collector-94cd847d-jwjlj 1/1 Running 3 8m32s jaeger-production-query-5cbfbd499d-tv8zf 3/3 Running 3 8m32s
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: jaeger-streaming spec: strategy: streaming collector: options: kafka: producer: topic: jaeger-spans #Note: If brokers are not defined,AMQStreams 1.4.0+ will self-provision Kafka. brokers: my-cluster-kafka-brokers.kafka:9092 storage: type: elasticsearch ingester: options: kafka: consumer: topic: jaeger-spans brokers: my-cluster-kafka-brokers.kafka:9092
oc login --username=<NAMEOFUSER> https://<HOSTNAME>:8443
oc new-project tracing-system
oc create -n tracing-system -f jaeger-streaming.yaml
oc get pods -n tracing-system -w
NAME READY STATUS RESTARTS AGE elasticsearch-cdm-jaegersystemjaegerstreaming-1-697b66d6fcztcnn 2/2 Running 0 5m40s elasticsearch-cdm-jaegersystemjaegerstreaming-2-5f4b95c78b9gckz 2/2 Running 0 5m37s elasticsearch-cdm-jaegersystemjaegerstreaming-3-7b6d964576nnz97 2/2 Running 0 5m5s jaeger-streaming-collector-6f6db7f99f-rtcfm 1/1 Running 0 80s jaeger-streaming-entity-operator-6b6d67cc99-4lm9q 3/3 Running 2 2m18s jaeger-streaming-ingester-7d479847f8-5h8kc 1/1 Running 0 80s jaeger-streaming-kafka-0 2/2 Running 0 3m1s jaeger-streaming-query-65bf5bb854-ncnc7 3/3 Running 0 80s jaeger-streaming-zookeeper-0 2/2 Running 0 3m39s
oc login --username=<NAMEOFUSER> https://<HOSTNAME>:6443
export JAEGER_URL=USD(oc get route -n tracing-system jaeger -o jsonpath='{.spec.host}')
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: name spec: strategy: <deployment_strategy> allInOne: options: {} resources: {} agent: options: {} resources: {} collector: options: {} resources: {} sampling: options: {} storage: type: options: {} query: options: {} resources: {} ingester: options: {} resources: {} options: {}
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: jaeger-all-in-one-inmemory
collector: replicas:
spec: collector: options: {}
options: collector: num-workers:
options: collector: queue-size:
options: kafka: producer: topic: jaeger-spans
options: kafka: producer: brokers: my-cluster-kafka-brokers.kafka:9092
options: log-level:
spec: sampling: options: {} default_strategy: service_strategy:
default_strategy: type: service_strategy: type:
default_strategy: param: service_strategy: param:
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: with-sampling spec: sampling: options: default_strategy: type: probabilistic param: 0.5 service_strategies: - service: alpha type: probabilistic param: 0.8 operation_strategies: - operation: op1 type: probabilistic param: 0.2 - operation: op2 type: probabilistic param: 0.4 - service: beta type: ratelimiting param: 5
spec: sampling: options: default_strategy: type: probabilistic param: 1
spec: storage: type:
storage: secretname:
storage: options: {}
storage: esIndexCleaner: enabled:
storage: esIndexCleaner: numberOfDays:
storage: esIndexCleaner: schedule:
elasticsearch: properties: doNotProvision:
elasticsearch: properties: name:
elasticsearch: nodeCount:
elasticsearch: resources: requests: cpu:
elasticsearch: resources: requests: memory:
elasticsearch: resources: limits: cpu:
elasticsearch: resources: limits: memory:
elasticsearch: redundancyPolicy:
elasticsearch: useCertManagement:
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: simple-prod spec: strategy: production storage: type: elasticsearch elasticsearch: nodeCount: 3 resources: requests: cpu: 1 memory: 16Gi limits: memory: 16Gi
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: simple-prod spec: strategy: production storage: type: elasticsearch elasticsearch: nodeCount: 1 storage: 1 storageClassName: gp2 size: 5Gi resources: requests: cpu: 200m memory: 4Gi limits: memory: 4Gi redundancyPolicy: ZeroRedundancy
es: server-urls:
es: max-doc-count:
es: max-num-spans:
es: max-span-age:
es: sniffer:
es: sniffer-tls-enabled:
es: timeout:
es: username:
es: password:
es: version:
es: num-replicas:
es: num-shards:
es: create-index-templates:
es: index-prefix:
es: bulk: actions:
es: bulk: flush-interval:
es: bulk: size:
es: bulk: workers:
es: tls: ca:
es: tls: cert:
es: tls: enabled:
es: tls: key:
es: tls: server-name:
es: token-file:
es-archive: bulk: actions:
es-archive: bulk: flush-interval:
es-archive: bulk: size:
es-archive: bulk: workers:
es-archive: create-index-templates:
es-archive: enabled:
es-archive: index-prefix:
es-archive: max-doc-count:
es-archive: max-num-spans:
es-archive: max-span-age:
es-archive: num-replicas:
es-archive: num-shards:
es-archive: password:
es-archive: server-urls:
es-archive: sniffer:
es-archive: sniffer-tls-enabled:
es-archive: timeout:
es-archive: tls: ca:
es-archive: tls: cert:
es-archive: tls: enabled:
es-archive: tls: key:
es-archive: tls: server-name:
es-archive: token-file:
es-archive: username:
es-archive: version:
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: simple-prod spec: strategy: production storage: type: elasticsearch options: es: server-urls: https://quickstart-es-http.default.svc:9200 index-prefix: my-prefix tls: ca: /es/certificates/ca.crt secretName: tracing-secret volumeMounts: - name: certificates mountPath: /es/certificates/ readOnly: true volumes: - name: certificates secret: secretName: quickstart-es-http-certs-public
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: simple-prod spec: strategy: production storage: type: elasticsearch options: es: server-urls: https://quickstart-es-http.default.svc:9200 1 index-prefix: my-prefix tls: 2 ca: /es/certificates/ca.crt secretName: tracing-secret 3 volumeMounts: 4 - name: certificates mountPath: /es/certificates/ readOnly: true volumes: - name: certificates secret: secretName: quickstart-es-http-certs-public
apiVersion: logging.openshift.io/v1 kind: Elasticsearch metadata: annotations: logging.openshift.io/elasticsearch-cert-management: "true" logging.openshift.io/elasticsearch-cert.jaeger-custom-es: "user.jaeger" logging.openshift.io/elasticsearch-cert.curator-custom-es: "system.logging.curator" name: custom-es spec: managementState: Managed nodeSpec: resources: limits: memory: 16Gi requests: cpu: 1 memory: 16Gi nodes: - nodeCount: 3 proxyResources: {} resources: {} roles: - master - client - data storage: {} redundancyPolicy: ZeroRedundancy
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: jaeger-prod spec: strategy: production storage: type: elasticsearch elasticsearch: name: custom-es doNotProvision: true useCertManagement: true
spec: query: replicas:
spec: query: options: {}
options: log-level:
options: query: base-path:
apiVersion: jaegertracing.io/v1 kind: "Jaeger" metadata: name: "my-jaeger" spec: strategy: allInOne allInOne: options: log-level: debug query: base-path: /jaeger
spec: ingester: options: {}
options: deadlockInterval:
options: kafka: consumer: topic:
options: kafka: consumer: brokers:
options: log-level:
apiVersion: jaegertracing.io/v1 kind: Jaeger metadata: name: simple-streaming spec: strategy: streaming collector: options: kafka: producer: topic: jaeger-spans brokers: my-cluster-kafka-brokers.kafka:9092 ingester: options: kafka: consumer: topic: jaeger-spans brokers: my-cluster-kafka-brokers.kafka:9092 ingester: deadlockInterval: 5 storage: type: elasticsearch options: es: server-urls: http://elasticsearch:9200
apiVersion: apps/v1 kind: Deployment metadata: name: myapp annotations: "sidecar.jaegertracing.io/inject": "true" 1 spec: selector: matchLabels: app: myapp template: metadata: labels: app: myapp spec: containers: - name: myapp image: acme/myapp:myversion
apiVersion: apps/v1 kind: StatefulSet metadata: name: example-statefulset namespace: example-ns labels: app: example-app spec: spec: containers: - name: example-app image: acme/myapp:myversion ports: - containerPort: 8080 protocol: TCP - name: jaeger-agent image: registry.redhat.io/distributed-tracing/jaeger-agent-rhel7:<version> # The agent version must match the Operator version imagePullPolicy: IfNotPresent ports: - containerPort: 5775 name: zk-compact-trft protocol: UDP - containerPort: 5778 name: config-rest protocol: TCP - containerPort: 6831 name: jg-compact-trft protocol: UDP - containerPort: 6832 name: jg-binary-trft protocol: UDP - containerPort: 14271 name: admin-http protocol: TCP args: - --reporter.grpc.host-port=dns:///jaeger-collector-headless.example-ns:14250 - --reporter.type=grpc
apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: cluster-collector namespace: tracing-system spec: mode: deployment config: | receivers: otlp: protocols: grpc: http: processors: exporters: jaeger: endpoint: jaeger-production-collector-headless.tracing-system.svc:14250 tls: ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt" service: pipelines: traces: receivers: [otlp] processors: [] exporters: [jaeger]
receivers:
receivers: otlp:
processors:
exporters:
exporters: jaeger: endpoint:
exporters: jaeger: tls: ca_file:
service: pipelines:
service: pipelines: traces: receivers:
service: pipelines: traces: processors:
service: pipelines: traces: exporters:
oc login --username=<NAMEOFUSER> https://<HOSTNAME>:6443
export JAEGER_URL=USD(oc get route -n tracing-system jaeger -o jsonpath='{.spec.host}')
oc login --username=<NAMEOFUSER>
oc get deployments -n <jaeger-project>
oc get deployments -n openshift-operators
oc get deployments -n openshift-operators
NAME READY UP-TO-DATE AVAILABLE AGE elasticsearch-operator 1/1 1 1 93m jaeger-operator 1/1 1 1 49m jaeger-test 1/1 1 1 7m23s jaeger-test2 1/1 1 1 6m48s tracing1 1/1 1 1 7m8s tracing2 1/1 1 1 35m
oc delete jaeger <deployment-name> -n <jaeger-project>
oc delete jaeger tracing2 -n openshift-operators
oc get deployments -n <jaeger-project>
oc get deployments -n openshift-operators
NAME READY UP-TO-DATE AVAILABLE AGE elasticsearch-operator 1/1 1 1 94m jaeger-operator 1/1 1 1 50m jaeger-test 1/1 1 1 8m14s jaeger-test2 1/1 1 1 7m39s tracing1 1/1 1 1 7m59s