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
- In the same directory as
otel.cfg
, run the following command to create a.zip
file for theotel.cfg
file.zip otelgwextension.zip otel.cfg
- 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" } ] } }
- Create a final
.zip
file that contains both the updatedmanifest.json
file and the.zip
file created in previous step.zip otel-ext.zip manifest.json otelgwextension.zip
Load the Gateway Extension
- Log in to the Cloud Manager as administrator.
- In the navigation list, click
Topology.
- From the list of gateway services, click
next to the gateway service and select Configure gateway extension.
- Click Add.
- Either drag and drop the .zip file of the gateway extension or click to upload the same.
- Click Save.
- Wait a few minutes for the extension to apply.