Skip to main content

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

1.
Find the plugin

Select Manage Jenkins, then Plugins, then Available plugins, and search for OpenTelemetry Plugin.

2.
Install and restart

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.

1.
Set the endpoint

Enter the OpenTelemetry endpoint for your Coralogix domain as the OTLP Endpoint.

2.
Add the credential

Under Authentication, select Bearer Token Authentication, then + Add to create a Secret text credential holding your Send-Your-Data API key.

3.
Select the token

Choose the credential you created from the Token dropdown.

Jenkins OpenTelemetry system configuration with the OTLP endpoint set and bearer token authentication selected

Shows the finished connection, with the token credential selected and the export-as-environment-variables option still off.

Set the service identity

1.
Name the service

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.

2.
Set the SDK properties

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.

Warning

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.

CheckWhat to look for
Plugin configurationNoteworthy active configuration properties and Active resource attributes under Advanced configuration show what the Java SDK is actually using
Host environmentOther OpenTelemetry-based applications on the Jenkins host may set variables that conflict with the plugin
Network reachConfirm Jenkins nodes can reach the ingress endpoint, accounting for proxies and security appliances on the egress route
Endpoint reachable but no dataPoint the OTLP endpoint at a locally deployed OpenTelemetry Collector instead, and check whether payloads arrive there
Last updated on
On this page
Was this page helpful?