ID: opentelemetry

Build Status Contributors Jenkins Plugin GitHub release Jenkins Plugin Installs


Collect Jenkins monitoring data through OpenTelemetry.


Using the OpenTelemetry Collector, you can use many monitoring backends to monitor Jenkins such as Jaeger, Zipkin, Prometheus, Elastic Observability and many others listed here.

Here are few examples of architecture:

Jenkins monitoring with Elastic Observability Jenkins monitoring with Jaeger and Prometheus


Monitoring and troubleshooting Jenkins jobs using distributed tracing

  • Understand where time is spent, including time spent waiting to schedule the job (time spent in the build queue)
    • The time spent in the built queue waiting for a build agent is visualised with the span "Phase : Start"
  • Detect increasing time spent in steps like
    • Invocations of external systems (e.g. git checkout...)
  • Built in integration with Elastic Observability, Jaeger, and Zipkin. Other OpenTelemetry compatible distributed tracing solutions are also supported.


Attribute Description Type Job name String Job name (user friendly) String
ci.pipeline.type Job type Enum (freestyle, workflow, multibranch, unknown)
ci.pipeline.multibranch.type Multibranch type Enum (branch, tag, change_request) Name of the node String Is this a complete build? Boolean Build duration Long Build description String Build number Long Build result Enum (aborted, success, failure, not_build and unstable) Build URL String Who triggered the build String
ci.pipeline.parameter.sensitive Whether the information contained in this parameter is sensitive or security related. Boolean Name of the parameter String
ci.pipeline.parameter.value Value of the parameter String
Attribute Description Type Step name (user friendly) String
jenkins.pipeline.step.type Step name String Step id String
jenkins.pipeline.step.node.label Labels attached to the node String
git.branch Git branch name String
git.repository Git repository String
git.username Git user String
jenkins.url Jenkins URL String Name of the node String

Metrics on Jenkins health indicators

Metrics Description Gauge of active jobs Job launched Job started Job completed Job aborted
jenkins.queue.waiting Number of waiting items in queue
jenkins.queue.blocked Number of blocked items in queue
jenkins.queue.buildable Number of buildable items in queue
jenkins.queue.left Total count of left items
jenkins.queue.time_spent_millis Total time spent in queue by items Number of agents Number of online agents
jenkins.agents.offline Number of offline agents

Jenkins metrics can be visualised with any OpenTelemetry compatible metrics solution such as Prometheus or Elastic Observability

Getting started

  • Setup an OpenTelemetry endpoint such as the OpenTelemetry Collector
  • Install the Jenkins OpenTelemetry plugin
  • Configure the Jenkins OpenTelemetry plugin navigating to the "Manage Jenkins / Configure System" screen
  • In the OpenTelemetry section define
    • "OTLP GRPC Endpoint": the hostname and port of the OpenTelemetry GRPC Protocol (OTLP GRPC) endpoint, typically an OpenTelemetry Collector or directly an Observability backend that supports the OTLP GRPC protocol
    • "Header Authentication" : name of the authentication header if header based authentication is used.
    • "Bearer Token Authentication": Bearer token when using header based authentication.
    • Visualization: the backend used to visualize job executions as traces.
      • Elastic Observability
      • Jaeger
      • Zipkin
      • Custom Observability backend for other visualisation solution

Sample Configuration


Sample of traces collected for various flavors of pipelines

Scripted Pipeline

Scripted pipeline status page

node {
    stage('Prepare') {
    stage('Build') {
        git ''
        sh "mvn -Dmaven.test.failure.ignore=true clean package"
    stage('Post Build') {
        echo("this is the post build phase")

Scripted pipeline status page with Elastic Observability link

Scripted pipeline visualized with Elastic Observability

Scripted pipeline visualised with Elastic Observability

Scripted pipeline visualized with Jaeger

Scripted pipeline visualised with Jaeger

Scripted pipeline visualized with Zipkin

Scripted pipeline visualised with Jaeger

Declarative Pipeline

Declarative pipeline visualised with Elastic Observability

pipeline {
    agent any

    stages {
        stage('Build') {
            steps {
                git ''
                sh "mvn -Dmaven.test.failure.ignore=true clean package"
            post {
                success {
                    echo "success"

Scripted Pipeline with Error


node {
    stage('Prepare') {
    stage('Build') {
        git ''
        sh "mvn -Dmaven.test.failure.ignore=true clean package"
    stage('Post Build') {
        error 'Fail'

Scripted Pipeline with Parallel Step


node {
    stage('Prepare') {
    stage('Build') {
        git ''
        sh "mvn -Dmaven.test.failure.ignore=true clean package"
    stage('Parallel Post Build') {
        parallel parallBranch1: {
            echo("this is the post build parallel branch 1")
        } ,parallBranch2: {
            echo("this is the post build parallel branch 2")
            echo("this is the post build parallel branch 2")

Freestyle Job



  • Collect labels of build agents
  • Detect outages caused by upgrades. Report on the version of the plugin of each plugin being used as a step

Configuration as code

This plugin supports configuration as code. Add to your yaml file:

    authentication: "noAuthentication"
    endpoint: "otel-collector-contrib:4317"
    exporterIntervalMillis: 60000
    exporterTimeoutMillis: 30000
    ignoredSteps: "dir,echo,isUnix,pwd,properties"
      - elastic:
          kibanaBaseUrl: "http://localhost:5601"
      - jaeger:
          jaegerBaseUrl: "http://localhost:16686"
      - customObservabilityBackend:
          metricsVisualisationUrlTemplate: "foo"
          traceVisualisationUrlTemplate: ""
      - zipkin:
          zipkinBaseUrl: "http://localhost:9411/"

See the jcasc folder with various samples.

For more details see the configuration as code plugin documentation:


Refer to our contribution guidelines


Licensed under Apache Software License 2, see LICENSE

ArchivesGet past versions
Version: 0.9
Requires Jenkins 2.235.1
Installs: 15
Cyrille Le Clerc
Help us improve this page!
To propose a change submit a pull request to the plugin page on GitHub.