• Log inStart now

Monitoring Jenkins with OpenTelemetry and New Relic

Monitor Jenkins with the OpenTelemetry plugin by visualizing jobs and pipeline executions as distributed traces.

Prerequisites

You need to first install the OpenTelemetry plugin from Jenkins:

  1. Log into Jenkins.
  2. From the Dashboard, click on Manage Jenkins.
  3. Under System Configuration, click Manage Plugins.
  4. Click the Available tab, and in the search bar, type OpenTelemetry.
  5. Select the OpenTelemetry checkbox, and Install without restart.
  6. Once the installation is complete, click Manage Jenkins.
  7. Under System Configuration, click Consigure System.
  8. Scroll down and check for a section called OpenTelemetry. If you can't see it, restart Jenkins.

Configuration

You need a New Relic OTLP Endpoint and an ingest license key to configure the Jenkins OpenTelemetry plugin to send data to New Relic.

  1. Enter an OTLP Endpoint. For example, https://otlp.nr-data.net:4317.
  2. For authentication, select Header Authentication: a. In the Header Name field, enter api-key. b. In the Header Value field, enter a secret text containing your New Relic ingest license key.
  3. Save the changes.

If you don't have a secret text created with your New Relic license key, click the + Add button and select Jenkins Credentials Provider, to create one. You can keep the default values except for kind and secret and the description is optional.

  1. From the Kind dropdown, select Secret text.
  2. In the secret field, enter your New Relic ingest license key.
  3. Optionally, add a description to note what the secret text is for.

Validation

Run a job or create a new pipeline to see Jenkins data in New Relic. Here's how to build a pipeline:

  1. Log into Jenkins and click New Item.
  2. Enter an item name, click Pipeline, and then OK.
  3. Scroll down to the very bottom to the Pipeline section.
  4. Use the Pipeline script, and select an option from the try sample Pipeline... dropdown.
  5. Click Save.
  6. In the newly created pipeline, click Build Now.
  7. Got to one.newrelic.com > APM & Services > Services - OpenTelemetry > jenkins.
  8. Click Distributed tracing to visualize jobs and pipeline executions.

While you wait for your data to come in...

Did this doc help you install?

Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.