ASM can export traces to Jaeger or Zipkin. You can view them on the Jaeger or Zipkin UI. The following uses Zipkin as an example.
The cluster and namespace where Zipkin is to be installed have been specified.
Log in to the CCE console and click the cluster name to go to the cluster console. In the navigation pane, choose Workloads. On the Deployments tab, click Create from YAML, and copy the following content to the YAML file:
apiVersion: apps/v1 kind: Deployment metadata: name: zipkin namespace: monitoring spec: progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app.kubernetes.io/instance: zipkin app.kubernetes.io/name: zipkin strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: labels: app.kubernetes.io/instance: zipkin app.kubernetes.io/name: zipkin spec: automountServiceAccountToken: false containers: - env: - name: STORAGE_TYPE value: mem image: openzipkin/zipkin-slim:latest # Community Zipkin image path. Ensure that you can access this path. imagePullPolicy: IfNotPresent name: zipkin readinessProbe: failureThreshold: 3 httpGet: path: /health port: 9411 scheme: HTTP initialDelaySeconds: 5 periodSeconds: 5 successThreshold: 1 timeoutSeconds: 1 resources: limits: cpu: 500m memory: 4Gi requests: cpu: 100m memory: 128Mi securityContext: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 terminationMessagePath: /dev/termination-log terminationMessagePolicy: File terminationGracePeriodSeconds: 30
The Deployment named zipkin is displayed on the Deployments tab. If the status of zipkin changes to Running, Zipkin has been installed in the monitoring namespace of the target cluster.
On the cluster console, choose Services & Ingresses in the navigation pane. On the Services tab, click Create Service. Then, configure the parameters as follows:
Retain the default values for other parameters.
The Service named zipkin is displayed on the Services tab.
If you do not need to access the Zipkin UI, set Access Type to ClusterIP.
Log in to the ASM console and click . In Cluster Configuration, select the cluster in 1. In Observability Configuration, enable tracing. Then, select Third-party Jaeger/Zipkin service for Version, set Service Address and Access Port, and configure other parameters as required.
Go to the service mesh details page. In the navigation pane, choose Service Management. On the displayed page, click the external address http://{IP address}:{Port number}/productpage of the productpage service.
You can obtain the IP address and port for logging in to the Zipkin client as follows: