Enabling open tracing for API management

Enable open tracing for API Connect so that you can monitor the API management capability with the Operations Dashboard in IBM Cloud Pak® for Integration.

Before you begin

Verify that the Operations Dashboard is installed.

Note: Open tracing is not supported when API management is deployed on Linux for IBM Z.

Procedure

  1. Change to the namespace where you installed API Connect to support the API management capability.
  2. Update the API Connect Cluster CR and add an openTracing section:
    1. Access the instance by clicking Installed Operators > IBM API Connect > API Connect Cluster > instance > YAML.
    2. In the spec section, add the following statements to the gateway section:

      The image paths shown in the example apply to the current release, so you can copy the entire openTracing section:

      openTracing:
            imageAgent: >-
              cp.icr.io/cp/icp4i/od/icp4i-od-agent:2.6.6-amd64@sha256:c1d4c1af871e3acf03c58f3cc84e81bd605de6f03ceef94ec9d891694cc14037
            imageCollector: >-
              cp.icr.io/cp/icp4i/od/icp4i-od-collector:2.6.6-amd64@sha256:c32850f264246937450415843e90da2fa222e53cc3b32897b6be0f5cc3d874b2
            odTracingDataHostname: od-store-od.tracing.svc
            odTracingNamespace: operations-db
            odTracingRegistrationHostname: icp4i-od.tracing.svc

      For a list of the open tracing mappings for each 2022 release, see Open Tracing image mapping per release.

      The following example shows the updated gateway section.
      Important: You must manually change the value of spec.license.accept to true or the deployment will fail.
      apiVersion: apiconnect.ibm.com/v1beta1
      kind: APIConnectCluster
      metadata:
        annotations:
          kubectl.kubernetes.io/last-applied-configuration: >
            {"apiVersion":"apiconnect.ibm.com/v1beta1","kind":"APIConnectCluster","metadata":{"annotations":{},"name":"apic","namespace":"apic"},"spec":{"appVersion":"10.0.0.0","license":{"accept":true,"use":"nonproduction"},"profile":"n3xc4.m16"}}
        creationTimestamp: '2021-12-15T18:31:50Z'
        generation: 5
        name: apic
        namespace: apic
        resourceVersion: '15638661'
        selfLink: /apis/apiconnect.ibm.com/v1beta1/namespaces/apic/apiconnectclusters/apic
        uid: 6b62f622-6b4e-4030-981f-1713a9c3db33
      spec:
        appVersion: 10.0.4.0
        gateway:
          adminUser: {}
          apicGatewayPeeringTLS: {}
          apicGatewayServiceTLS: {}
          gatewayEndpoint: {}
          gatewayManagerEndpoint: {}
          openTracing:
            imageAgent: >-
              cp.icr.io/cp/icp4i/od/icp4i-od-agent:2.6.6-amd64@sha256:c1d4c1af871e3acf03c58f3cc84e81bd605de6f03ceef94ec9d891694cc14037
            imageCollector: >-
              cp.icr.io/cp/icp4i/od/icp4i-od-collector:2.6.6-amd64@sha256:c32850f264246937450415843e90da2fa222e53cc3b32897b6be0f5cc3d874b2
            odTracingDataHostname: od-store-od.tracing.svc
            odTracingNamespace: operations-db
            odTracingRegistrationHostname: icp4i-od.tracing.svc
        imagePullSecrets:
          - ibm-entitlement-key
          - ibm-entitlement-key
        imageRegistry: cp.icr.io/cp/apic
        license:
          accept: false
          metric: VirtualProcessorCore
          use: nonproduction
        profile: n3xc4.m16
    3. Save your changes.
  3. Register API Connect with the Operations Dashboard:
    1. Click Operations Dashboard > Manage > Registration Process.
    2. Approve the request, and then follow the instructions to create the necessary secret.
    3. Verify that the API Connect Gateway pod now includes 3 containers, which indicates that tracing is now enabled.

      See the apic-gw-0 pod in the following example:

      oc get pods -n apic
      NAME                                                              READY   STATUS      RESTARTS   AGE
      apic-a7s-client-84c6f5f984-thzjd                                  1/1     Running     0          14d
      apic-a7s-ingestion-676b486477-2zbs8                               1/1     Running     0          14d
      apic-a7s-mtls-gw-bb54f54c-lp97f                                   1/1     Running     0          14d
      apic-a7s-storage-coord-7c8789cc8c-gnhlb                           1/1     Running     0          14d
      apic-a7s-storage-data-0                                           1/1     Running     0          14d
      apic-a7s-storage-master-0                                         1/1     Running     0          14d
      apic-configurator-6rxhn                                           0/1     Completed   0          14d 
      apic-gw-0                                                         3/3     Running     0          3m36s 
      apic-gw-datapower-monitor-76ffdf6cb5-c5spx                        1/1     Running     0          4m22s
      apic-gw-od-registration-job-chbpd                                 0/1     Completed   0          3h47m