All Products
Search
Document Center

:Configure reporting of ASM link tracking data

Last Updated:Mar 28, 2025

Service Mesh (ASM) allows you to report metrics to Managed Service for OpenTelemetry and self-managed system. You can specify these metrics in the Managed Service for OpenTelemetry console. This topic describes how to collect ASM tracing data to Managed Service for OpenTelemetry and self-managed system.

Prerequisites

Collect ASM tracing data to Managed Service for OpenTelemetry

Perform the following steps based on the version of your ASM instance. If you need to upgrade an instance version, see Update an ASM instance.

For ASM instances whose versions are earlier than 1.17.2.35

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose ASM Instance > Base Information.

  3. On the Base Information page, click Settings. In the Settings Update panel, select Enable Tracing Analysis, set Sampling Percentage, select Enable Managed Service for OpenTelemetry for Sampling Method, and then click OK.

  4. In the left-side navigation pane, choose Observability Management Center > Tracing Analysis. You are redirected to the Managed Service for OpenTelemetry console. In the console, you can find the ASM tracing data.链路追踪.png

    For more information about Managed Service for OpenTelemetry, see What is Managed Service for OpenTelemetry?

Note

If you no longer need to use this feature, clear Enable Tracing Analysis in the Settings Update panel and click OK.

For ASM instances whose versions are 1.17.2.35 or later and earlier than 1.18.0.124

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose Observability Management Center > Tracing Analysis.

  3. On the Tracing Analysis page, click Collect ASM Tracing Data to Managed Service for OpenTelemetry. In the Submit message, click OK.

  4. Click Open the Managed Service for OpenTelemetry Console to view the ASM tracing data.

    For more information about Managed Service for OpenTelemetry, see What is Managed Service for OpenTelemetry?链路追踪.png

Note

If you no longer need to use this feature, click Disable Collection on the Tracing Analysis page. In the Submit message, click OK.

For ASM instances whose versions are 1.18.0.124 or later and earlier than 1.22.6.89

In this version range, you cannot export ASM tracing data to Managed Service for OpenTelemetry in the console. You can configure the Collector in the system by using the following steps.

Step 1: Deploy the OpenTelemetry Operator

  1. Use kubectl to connect to the ACK cluster based on the information in the kubeconfig file. Then, run the following command to create the opentelemetry-operator-system namespace:

    kubectl create namespace opentelemetry-operator-system
  2. Run the following commands to use Helm to install the OpenTelemetry Operator in the opentelemetry-operator-system namespace:

    helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
    helm install --namespace=opentelemetry-operator-system opentelemetry-operator open-telemetry/opentelemetry-operator \
      --set "manager.collectorImage.repository=otel/opentelemetry-collector-k8s" \
      --set admissionWebhooks.certManager.enabled=false \
      --set admissionWebhooks.autoGenerateCert.enabled=true
  3. Run the following command to check whether the OpenTelemetry Operator works properly:

    kubectl get pod -n opentelemetry-operator-system

    Expected output:

    NAME                                      READY   STATUS    RESTARTS   AGE
    opentelemetry-operator-854fb558b5-pvllj   2/2     Running   0          1m

    The output indicates that the STATUS is Running. This means that the OpenTelemetry Operator works properly.

Step 2: Create OpenTelemetry Collector

  1. Create a collector.yaml file with the following content.

    Replace ${ENDPOINT} in the YAML with the VPC network access point of the gRPC protocol, and ${TOKEN} with the authentication token. For information on how to obtain the access point and authentication token for Alibaba Cloud Managed Service for OpenTelemetry, see Access and Authentication Instructions.

    Expand to view collector.yaml

    apiVersion: opentelemetry.io/v1alpha1
    kind: OpenTelemetryCollector
    metadata:
      labels:
        app.kubernetes.io/managed-by: opentelemetry-operator
      name: default
      namespace: opentelemetry-operator-system
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      config: |
        extensions:
          zpages:
            endpoint: 0.0.0.0:55679 
        receivers:
          otlp:
            protocols:
              grpc:
                endpoint: 0.0.0.0:4317
        exporters:
          debug:
            verbosity: detailed
          otlp:
            endpoint: ${ENDPOINT}
            tls:
              insecure: true
            headers:
              Authentication: ${TOKEN}
        service:
          extensions: [zpages]
          pipelines:
            traces:
              receivers: [otlp]
              processors: []
              exporters: [otlp, debug]
      ingress:
        route: {}
      managementState: managed
      mode: deployment
      observability:
        metrics: {}
      podDisruptionBudget:
        maxUnavailable: 1
      replicas: 1
      resources: {}
      targetAllocator:
        prometheusCR:
          scrapeInterval: 30s
        resources: {}
      upgradeStrategy: automatic
    
  2. In the kubeconfig environment corresponding to the ACK cluster, execute the following command to deploy the collector to the cluster.

    kubectl apply -f collector.yaml
  3. Execute the following command to check whether the collector is started properly.

    kubectl get pod -n opentelemetry-operator-system

    Expected output:

    NAME                                      READY   STATUS    RESTARTS   AGE
    opentelemetry-operator-854fb558b5-pvllj   2/2     Running   0          3m
    default-collector-5cbb4497f4-2hjqv        1/1     Running   0          30s

    The expected output indicates that the collector is started properly.

  4. Execute the following command to check whether the service is created.

    kubectl get svc -n opentelemetry-operator-system

    Expected output:

    opentelemetry-operator           ClusterIP   172.16.138.165   <none>        8443/TCP,8080/TCP   3m
    opentelemetry-operator-webhook   ClusterIP   172.16.127.0     <none>        443/TCP             3m
    default-collector              ClusterIP   172.16.145.93    <none>        4317/TCP   30s
    default-collector-headless     ClusterIP   None             <none>        4317/TCP   30s
    default-collector-monitoring   ClusterIP   172.16.136.5     <none>        8888/TCP   30s

    The expected output indicates that the service is created successfully.

Step 3: Enable link tracking through the ASM console

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose Observability Management Center > Observability Settings.

  3. On the Observability Configuration page, within the Link Tracking Settings section, adjust the Sampling Percentage to 100, and then click Submit.

  4. In the left-side navigation pane, select Observability Management Center > Link Tracking. Enter Opentelemetry Service Address/domain Name as default-collector.opentelemetry-operator-system.svc.cluster.local, enter Opentelemetry Service Port as 4317, and then click Collect Service Mesh Link Tracking Data To Opentelemetry.

For ASM instances whose versions are 1.22.6.89 or later

  1. Log on to the ASM console. In the left-side navigation pane, choose Service Mesh > Mesh Management.

  2. On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose Observability Management Center > Tracing Analysis.

  3. On the Tracing Analysis page, select Export Method to Export to Alibaba Cloud Observable link, select a method to submit data below Fill in the configuration, such as Zipkin, and then click Submission.

  4. Click Go To Alibaba Cloud Observable link OpenTelemetry console to view the ASM tracing data. For more information, see What is Managed Service for OpenTelemetry?.

    image

    Note

    If you no longer need to use this feature, click Disable Collection on the Tracing Analysis page. In the Submit message, click OK.

Export ASM tracing data to a self-managed system

The import method varies with the versions of ASM instances. Perform the following steps based on the version of your ASM instance:

For ASM instances whose versions are earlier than 1.18.0.124

  • For ASM instances whose versions are earlier than 1.17.2.28: Log on to the ASM console. On the Basic Information pag, click Settings, select Enable Tracing Analysis to configure items as needed, and then click OK.

  • For more information about how to enable tracing analysis for ASM instances whose versions are 1.17.2.28 and later and earlier than 1.18.0.124, see the section Description of Tracing Analysis Settings in the topic "Configure observability settings".

For ASM instances whose versions are 1.18.0.124 or later and earlier than 1.22.6.89

In this version range, you can report ASM tracing data to Managed Service for OpenTelemetry in the console. Log on to the ASM console. On the Observability Management Center > Link Tracking page, configure the following parameters.

Configuration description

Item

Description

OpenTelemetry Domain Name (FQDN)

The domain name of a self-managed system, which needs to be a fully qualified domain name (FQDN). Example: otel.istio-system.svc.cluster.local.

OpenTelemetry Service Port

The service port of the self-managed system. Example: 8090.

For ASM instances whose versions are 1.22.6.89 or later

Log on to the ASM console. On the Observability Management Center > Link Tracking page, select and configure a self-managed system.

Important

To import the ASM tracing data to a self-managed system, ensure that the system has been deployed in the ASM instance. Otherwise, you need to define the self-managed system in the service registry of the ASM instance by creating ServiceEntry. For more information, see ServiceEntry.

Configuration description

Report data to Managed Service for OpenTelemetry

Item

Description

Service domain name (full FQDN)

The domain name of the self-managed system, which needs to be a FQDN. For example, otel.istio-system.svc.cluster.local.

Service Port

The service port of the self-managed system. For example, 8090.

Reporting via gRPC

Timeout

Optional. The request timeout period of reporting data to Managed Service for OpenTelemetry. Unit: seconds. For example, 1. Disabled by default.

Request Header

Optional. The headers that are carried when reporting data to Managed Service for OpenTelemetry. For example, authentication: token-xxx. Empty by default.

Reporting via http

Request Path

The request path of reporting data to Managed Service for OpenTelemetry. For example, /api/v2/spans. Default value: /.

Timeout

Optional. The request timeout period of reporting data to Managed Service for OpenTelemetry. Unit: seconds. For example, 1. Disabled by default.

Request Header

Optional. The headers that are carried when reporting data to Managed Service for OpenTelemetry. For example, authentication: token-xxx. Empty by default.

Report data to Zipkin

Item

Description

Service domain name (full FQDN)

The domain name of the self-managed system, which needs to be a FQDN. For example, zipkin.istio-system.svc.cluster.local.

Service Port

The service port of the self-managed system. For example, 8090.

Request Path

The request path of reporting data to Zipkin. For example, /api/v2/spans. Default value: /api/v2/spans.

Report data to Skywalking

Item

Description

Service domain name (full FQDN)

The domain name of the self-managed system, which needs to be a FQDN. For example, skywalking.istio-system.svc.cluster.local.

Service Port

The service port of the self-managed system. For example, 8090.

Verify reported ASM tracing data

Deploy an application

  1. Deploy a sample application.

    1. Create a file named bookinfo.yaml and copy the following content to the file.

      Expand to view details

      apiVersion: v1
      kind: Service
      metadata:
        name: details
        labels:
          app: details
          service: details
      spec:
        ports:
        - port: 9080
          name: http
        selector:
          app: details
      ---
      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: bookinfo-details
        labels:
          account: details
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: details-v1
        labels:
          app: details
          version: v1
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: details
            version: v1
        template:
          metadata:
            labels:
              app: details
              version: v1
          spec:
            serviceAccountName: bookinfo-details
            containers:
            - name: details
              image: registry-cn-hangzhou.ack.aliyuncs.com/ack-demo/examples-bookinfo-details-v1:1.20.1
              imagePullPolicy: IfNotPresent
              ports:
              - containerPort: 9080
      ---
      ##################################################################################################
      # Ratings service
      ##################################################################################################
      apiVersion: v1
      kind: Service
      metadata:
        name: ratings
        labels:
          app: ratings
          service: ratings
      spec:
        ports:
        - port: 9080
          name: http
        selector:
          app: ratings
      ---
      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: bookinfo-ratings
        labels:
          account: ratings
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: ratings-v1
        labels:
          app: ratings
          version: v1
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: ratings
            version: v1
        template:
          metadata:
            labels:
              app: ratings
              version: v1
          spec:
            serviceAccountName: bookinfo-ratings
            containers:
            - name: ratings
              image: registry-cn-hangzhou.ack.aliyuncs.com/ack-demo/examples-bookinfo-ratings-v1:1.20.1
              imagePullPolicy: IfNotPresent
              ports:
              - containerPort: 9080
      ---
      ##################################################################################################
      # Reviews service
      ##################################################################################################
      apiVersion: v1
      kind: Service
      metadata:
        name: reviews
        labels:
          app: reviews
          service: reviews
      spec:
        ports:
        - port: 9080
          name: http
        selector:
          app: reviews
      ---
      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: bookinfo-reviews
        labels:
          account: reviews
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: reviews-v1
        labels:
          app: reviews
          version: v1
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: reviews
            version: v1
        template:
          metadata:
            labels:
              app: reviews
              version: v1
          spec:
            serviceAccountName: bookinfo-reviews
            containers:
            - name: reviews
              image: registry-cn-hangzhou.ack.aliyuncs.com/ack-demo/examples-bookinfo-reviews-v1:1.20.1
              imagePullPolicy: IfNotPresent
              env:
              - name: LOG_DIR
                value: "/tmp/logs"
              ports:
              - containerPort: 9080
              volumeMounts:
              - name: tmp
                mountPath: /tmp
              - name: wlp-output
                mountPath: /opt/ibm/wlp/output
            volumes:
            - name: wlp-output
              emptyDir: {}
            - name: tmp
              emptyDir: {}
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: reviews-v2
        labels:
          app: reviews
          version: v2
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: reviews
            version: v2
        template:
          metadata:
            labels:
              app: reviews
              version: v2
          spec:
            serviceAccountName: bookinfo-reviews
            containers:
            - name: reviews
              image: registry-cn-hangzhou.ack.aliyuncs.com/ack-demo/examples-bookinfo-reviews-v2:1.20.1
              imagePullPolicy: IfNotPresent
              env:
              - name: LOG_DIR
                value: "/tmp/logs"
              ports:
              - containerPort: 9080
              volumeMounts:
              - name: tmp
                mountPath: /tmp
              - name: wlp-output
                mountPath: /opt/ibm/wlp/output
            volumes:
            - name: wlp-output
              emptyDir: {}
            - name: tmp
              emptyDir: {}
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: reviews-v3
        labels:
          app: reviews
          version: v3
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: reviews
            version: v3
        template:
          metadata:
            labels:
              app: reviews
              version: v3
          spec:
            serviceAccountName: bookinfo-reviews
            containers:
            - name: reviews
              image: registry-cn-hangzhou.ack.aliyuncs.com/ack-demo/examples-bookinfo-reviews-v3:1.20.1
              imagePullPolicy: IfNotPresent
              env:
              - name: LOG_DIR
                value: "/tmp/logs"
              ports:
              - containerPort: 9080
              volumeMounts:
              - name: tmp
                mountPath: /tmp
              - name: wlp-output
                mountPath: /opt/ibm/wlp/output
            volumes:
            - name: wlp-output
              emptyDir: {}
            - name: tmp
              emptyDir: {}
      ---
      ##################################################################################################
      # Productpage services
      ##################################################################################################
      apiVersion: v1
      kind: Service
      metadata:
        name: productpage
        labels:
          app: productpage
          service: productpage
      spec:
        ports:
        - port: 9080
          name: http
        selector:
          app: productpage
      ---
      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: bookinfo-productpage
        labels:
          account: productpage
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: productpage-v1
        labels:
          app: productpage
          version: v1
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: productpage
            version: v1
        template:
          metadata:
            annotations:
              prometheus.io/scrape: "true"
              prometheus.io/port: "9080"
              prometheus.io/path: "/metrics"
            labels:
              app: productpage
              version: v1
          spec:
            serviceAccountName: bookinfo-productpage
            containers:
            - name: productpage
              image: registry-cn-hangzhou.ack.aliyuncs.com/ack-demo/examples-bookinfo-productpage-v1:1.20.1
              imagePullPolicy: IfNotPresent
              ports:
              - containerPort: 9080
              volumeMounts:
              - name: tmp
                mountPath: /tmp
            volumes:
            - name: tmp
              emptyDir: {}
      ---
    2. Deploy the Bookinfo application to the Kubernetes cluster on the data plane:

      kubectl --kubeconfig=${DATA_PLANE_KUBECONFIG} apply -f bookinfo.yaml
  2. Deploy a sleep application.

    1. Create a file named sleep.yaml file and copy the following content to the file.

      Expand to view details

      apiVersion: v1
      kind: ServiceAccount
      metadata:
        name: sleep
      ---
      apiVersion: v1
      kind: Service
      metadata:
        name: sleep
        labels:
          app: sleep
          service: sleep
      spec:
        ports:
        - port: 80
          name: http
        selector:
          app: sleep
      ---
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: sleep
      spec:
        replicas: 1
        selector:
          matchLabels:
            app: sleep
        template:
          metadata:
            labels:
              app: sleep
          spec:
            terminationGracePeriodSeconds: 0
            serviceAccountName: sleep
            containers:
            - name: sleep
              image: registry.cn-hangzhou.aliyuncs.com/acs/curl:8.1.2
              command: ["/bin/sleep", "infinity"]
              imagePullPolicy: IfNotPresent
              volumeMounts:
              - mountPath: /etc/sleep/tls
                name: secret-volume
            volumes:
            - name: secret-volume
              secret:
                secretName: sleep-secret
                optional: true
      ---
    2. Deploy the sleep application.

      kubectl --kubeconfig=${DATA_PLANE_KUBECONFIG} apply -f sleep.yaml

Initiate a test

Run the following command to initiate a test.

 kubectl exec -it deploy/sleep -- sh -c 'for i in $(seq 1 100); do curl -s productpage:9080/productpage > /dev/null; done'

View reported ASM tracing data

The following example shows the result of reporting ASM tracing data to Managed Service for OpenTelemetry.

  1. Log on to the Managed Service for OpenTelemetry console.

  2. Click Application List in the left-side navigation pane to view the data shown in the following figure.

    image