Enabling OpenTelemetry configuration

Open Telemetry (OTel) is an open framework for creating and managing telemetry data, which might be traces, metrics or logs. OTel is not an alternative to monitoring tools, rather it enhances them. OTel typically supports the handling of traces, metrics, and logs.

Note: OTel support is available for DataPower 10.6.0.1 and above.

Create OpenTelemetry configuration

Create the Open Telemetry configuration as follows and save it as otel.cfg. If needed, update the parameters as per the requirement. The default ports for OpenTelemetry are 4317 (grpc) or 4318 (http).
Note: Change the hostname and PORT in the following config to match your OTel Agent.
%if% available "otel-exporter"
otel-exporter "otel-exp"
  type http
  hostname otel-collector.cp4i.svc.cluster.local
  traces-path "/v1/traces"
  logs-path "/v1/logs"
  port 4318
  http-content-type binary
  timeout 10
  processor batch
  max-queue-size 2048
  max-export-size 512
  export-delay-interval 5000
exit
%endif%
%if% available "otel-sampler"
otel-sampler "otel-samp"
  parent-based
  type always-on
exit
%endif%
%if% available "otel"
otel "api-otel"
  exporter otel-exp
  sampler otel-samp
exit
%endif%
apigw "apiconnect"
  otel api-otel
exit

Create the gateway extension

  1. In the same directory as otel.cfg, run the following command to create a .zip file for the otel.cfg file.
    zip otelgwextension.zip otel.cfg
  2. Create a file that is named manifest.json with content specified as follow referring the newly created .zip file's name.
    {
        "extension": {
            "files": [
                {
                    "filename": "otelgwextension.zip",
                    "deploy": "immediate",
                    "type": "extension"
                }
            ]
        }
    }
  3. Create a final .zip file that contains both the updated manifest.json file and the .zip file created in previous step.
    zip otel-ext.zip manifest.json otelgwextension.zip

Load the Gateway Extension

  1. Log in to the Cloud Manager as administrator.
  2. In the navigation list, click Topology Topology.
  3. From the list of gateway services, click Options menu next to the gateway service and select Configure gateway extension.
  4. Click Add.
  5. Either drag and drop the .zip file of the gateway extension or click to upload the same.
  6. Click Save.
  7. Wait a few minutes for the extension to apply.