• EnglishEspañol日本語한국어Português
  • Log inStart now

Monitor Jenkins with OpenTelemetry and New Relic

Monitor Jenkins with the OpenTelemetry plugin by visualizing jobs and pipeline executions as distributed traces. You can also install the quickstart to get a pre-built dashboard to monitor your Jenkins pipeline.

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 Plugins.
  4. Click the Available plugins tab, then search for OpenTelemetry.
  5. Select the OpenTelemetry checkbox, and Install without restart.
  6. Once the installation is complete, click Manage Jenkins.
  7. Under System Configuration, click 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 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 > All capabilities > APM & services > Services - OpenTelemetry > jenkins.
  8. Click Distributed tracing to visualize jobs and pipeline executions.
  9. Click Logs to see your Jenkins console logs. If there are no logs, check to make sure the environment variable OTEL_LOGS_EXPORTER="otlp" is set.

Install the Jenkins quickstart dashboard

After you've sent your Jenkins pipeline data to New Relic, you can also easily monitor your jobs and pipeline executions with the prebuilt dashboard from New Relic Instant Observability. Get started in minutes with a pre-built dashboard to see key metrics in a consolidated view:

  1. Go to the Jenkins quickstart in New Relic Instant Observability, and click + Install now.
  2. Select an account and click Begin installation.
  3. If you've already completed the validation, select done to move onto the next step.
  4. The quickstart deploys the resources to your account. Click see your data to get to the dashboard.

Important

The Jenkins OpenTelemetry plugin is not maintained by New Relic, so if you have any issues with the instrumentation, create a new issue in the plugin's GitHub repo.

Did this doc help with your installation?

Copyright © 2024 New Relic Inc.

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