Jenkins telemetry
Pipeline delays and failures are hard to diagnose from Jenkins alone. The OpenTelemetry plugin for Jenkins sends metrics and traces to Coralogix, so a slow build can be read against the rest of your telemetry.
For logs and tagging, use the Coralogix plugin for Jenkins instead. See Logs exporter for why.
Runs on Linux, Windows, and macOS.
What you need
- A Jenkins server, and an account with permission to add plugins and edit the system configuration.
- A Coralogix Send-Your-Data API key.
- The OpenTelemetry endpoint for your Coralogix domain. Use the domain selector at the top of this page to resolve it: ingress.:443
Install the plugin
Select Manage Jenkins, then Plugins, then Available plugins, and search for OpenTelemetry Plugin.
Select the plugin's checkbox, select Install, then restart Jenkins.
Connect it to Coralogix
Open Manage Jenkins, then System, and scroll to the OpenTelemetry section.
Enter the OpenTelemetry endpoint for your Coralogix domain as the OTLP Endpoint.
Under Authentication, select Bearer Token Authentication, then + Add to create a Secret text credential holding your Send-Your-Data API key.
Choose the credential you created from the Token dropdown.
Shows the finished connection, with the token credential selected and the export-as-environment-variables option still off.
Set the service identity
In Advanced configuration, set a Service name that suits your deployment, and a Service namespace for your use case. Disabled resource providers and Steps to be ignored can stay at their defaults.
In Configuration properties, add at minimum:
otel.exporter.otlp.protocol=http/protobuf
otel.resource.attributes=cx.application.name=Jenkins-otel,cx.subsystem.name=Jenkins-otel
otel.exporter.otlp.protocol switches the exporter from gRPC to http/protobuf, which is the protocol Coralogix prefers. otel.resource.attributes sets the application and subsystem the data is filed under; append more comma-separated key-value pairs to add further attributes.
Optional configuration
Export the configuration as environment variables
The Export OpenTelemetry configuration as environment variables checkbox exposes the configured SDK values to the environment. You need it to install extensions that instrument non-Jenkins executables such as Maven or Ansible.
Enabling it puts your Coralogix API key into OTEL_EXPORTER_OTLP_HEADERS. It can also collide with other services on the same host that read or set the same variables.
Disabled resource providers
Resource providers enrich traces and metrics with metadata. Having too many enabled can produce conflicting metadata; Disabled resource providers turns individual ones off. The Java SDK resource providers are documented upstream.
Logs exporter
The Coralogix plugin for Jenkins is the better route for logs and tags, but the OpenTelemetry plugin can carry logs too. Add these to Configuration properties:
otel.logs.exporter=otlp
otel.logs.mirror_to_disk=true
This submits system, audit, and pipeline logs. Pipeline logs are limited to what Jenkins agents execute directly, capturing external applications such as Maven or Ansible requires the corresponding extensions.
Disable a pipeline
To collect only metrics or only traces, set the other exporter to none in Configuration properties:
otel.traces.exporter=none
# or
otel.metrics.exporter=none
Validate
Restart Jenkins. After signing back in, metrics and traces should start arriving under the application and subsystem names you configured.
Troubleshooting
Work through these in order if nothing arrives.
| Check | What to look for |
|---|---|
| Plugin configuration | Noteworthy active configuration properties and Active resource attributes under Advanced configuration show what the Java SDK is actually using |
| Host environment | Other OpenTelemetry-based applications on the Jenkins host may set variables that conflict with the plugin |
| Network reach | Confirm Jenkins nodes can reach the ingress endpoint, accounting for proxies and security appliances on the egress route |
| Endpoint reachable but no data | Point the OTLP endpoint at a locally deployed OpenTelemetry Collector instead, and check whether payloads arrive there |
