|
| 1 | +//// |
| 2 | +This module is included in the following assemblies: |
| 3 | +* service_mesh/v2x/ossm-observability.adoc |
| 4 | +//// |
| 5 | + |
| 6 | +:_mod-docs-content-type: PROCEDURE |
| 7 | +[id="ossm-configuring-distr-tracing-tempo_{context}"] |
| 8 | += Configuring the distributed tracing platform (Tempo) |
| 9 | + |
| 10 | +You can expose tracing data to the {TempoName} stack by appending a named element and the `zipkin` provider to the `spec.meshConfig.extensionProviders` specification in the `ServiceMehControlPlane`, as shown in the following example. Then, a telemetry custom resource configures Istio proxies to collect trace spans and send them to the Tempo distributor service endpoint. |
| 11 | + |
| 12 | +You can create a TempoStack instance in the `tracing-system` namespace _after_ creating the `ServiceMeshControlPlane` and the `ServiceMeshMemberRoll` resources. |
| 13 | + |
| 14 | +.Prerequisites |
| 15 | + |
| 16 | +* You have installed the {TempoOperator} and {SMProductName} Operator in the `openshift-operators` namespace. |
| 17 | +* You have created namespaces such as `istio-system` and `tracing-system`. |
| 18 | +
|
| 19 | +.Procedure |
| 20 | + |
| 21 | +. Configure the `ServiceMeshControlPlane` resource to define an extension provider: |
| 22 | ++ |
| 23 | +[source,yaml] |
| 24 | +---- |
| 25 | +kind: ServiceMeshControlPlane |
| 26 | +apiVersion: maistra.io/v2 |
| 27 | +metadata: |
| 28 | + name: basic |
| 29 | + namespace: istio-system |
| 30 | +spec: |
| 31 | +# ... |
| 32 | + meshConfig: |
| 33 | + extensionProviders: |
| 34 | + - name: tempo |
| 35 | + zipkin: |
| 36 | + service: tempo-sample-distributor.tracing-system.svc.cluster.local |
| 37 | + port: 9411 |
| 38 | + tracing: |
| 39 | + sampling: 10000 |
| 40 | + type: None <1> |
| 41 | + version: v2.5 |
| 42 | +--- |
| 43 | +kind: ServiceMeshMemberRoll |
| 44 | +apiVersion: maistra.io/v1 |
| 45 | +metadata: |
| 46 | + name: default |
| 47 | + namespace: istio-system |
| 48 | +spec: |
| 49 | + members: |
| 50 | + - tracing-system |
| 51 | +---- |
| 52 | +<1> The `spec.tracing.type` setting defines a deprecated Distributed Tracing Jaeger instance. Set `spec.tracing.type` to `None` when connecting to a TempoStack using an `extensionProvider` setting. |
| 53 | ++ |
| 54 | +[NOTE] |
| 55 | +==== |
| 56 | +Create a TempoStack instance _after_ creating the `ServiceMeshControlPlane` and the `ServiceMeshMemberRoll` resources. |
| 57 | +==== |
| 58 | + |
| 59 | +. Configure the Kiali resource specification to enable a Kiali workload traces dashboard. You can use the dashboard to view tracing query results. |
| 60 | ++ |
| 61 | +[source,yaml] |
| 62 | +---- |
| 63 | +apiVersion: kiali.io/v1alpha1 |
| 64 | +kind: Kiali |
| 65 | +# ... |
| 66 | +spec: |
| 67 | + external_services: |
| 68 | + tracing: |
| 69 | + query_timeout: 30 |
| 70 | + enabled: true |
| 71 | + in_cluster_url: 'http://tempo-sample-query-frontend.tracing-system.svc.cluster.local:16686' |
| 72 | + url: '[Tempo query frontend Route url]' |
| 73 | +---- |
| 74 | ++ |
| 75 | +[NOTE] |
| 76 | +==== |
| 77 | +Kiali 1.73 uses the Jaeger Query API, which causes a longer response time depending on Tempo resource limits. If you see a `Could not fetch spans` error message in the Kiali UI, then check your Tempo configuration or reduce the limit per query in Kiali. |
| 78 | +==== |
| 79 | + |
| 80 | +. Create a TempoStack instance using the Red Hat {TempoOperator} in the `tracing-system` namespace. For more information, see "Installing the distributed tracing platform (Tempo)" in the "Additional resources" section. |
| 81 | + |
| 82 | +. Apply a Telemetry custom resource for {SMProductShortName} to start the Tempo provider setting. |
| 83 | ++ |
| 84 | +[source,yaml] |
| 85 | +---- |
| 86 | +apiVersion: telemetry.istio.io/v1alpha1 |
| 87 | +kind: Telemetry |
| 88 | +metadata: |
| 89 | + name: mesh-default |
| 90 | + namespace: istio-system |
| 91 | +spec: |
| 92 | + tracing: |
| 93 | + - providers: |
| 94 | + - name: tempo |
| 95 | + randomSamplingPercentage: 100 |
| 96 | +---- |
| 97 | + |
| 98 | +You can also create an Istio gateway and virtual service resources to expose an {product-title} route for accessing the Tempo Jaeger Query console. |
0 commit comments