OpenTelemetry is a flexible toolkit that you can implement in a variety of ways. We recommend a basic four-step approach for setting up OpenTelemetry with New Relic. Here's an overview of the process, followed by details for each step.
- Instrument your service with OpenTelemetry
- Export your telemetry data to New Relic
- View your data in the New Relic UI
First things first:
To get started, you instrument your service with OpenTelemetry. OpenTelemetry has language-specific products and SDKs to help you. Many languages offer out-the-box instrumentation for common libraries and frameworks. Each language also provides an API for further instrumenting your service manually.
Go to the repository for your language and follow the instructions to instrument your service. When you're done, return here to complete Step 3. Export your telemetry data to New Relic.
- ...See a complete list of languages in GitHub
The OpenTelemetry Protocol, or OTLP for short, is a general purpose telemetry data delivery protocol designed for the OpenTelemetry project. This protocol describes how to encode and transmit telemetry data, which makes it a natural choice for data transport. Each language SDK provides an OTLP exporter you can configure to export data over OTLP.
Our support of OTLP ingest is currently in pre-release. To particiapte in the pre-release program, please complete this form, and we'll send you details.
In this step, we focus on how to configure an OTLP exporter in your service to export data directly to New Relic:
If you prefer to export your data to an OpenTelemetry collector, see our instructions below.
To complete this step, you'll follow the OTLP exporter documenentation for your language. Before you go to this external documentation, keep in mind you'll need to configure the OTLP exporter to send data to New Relic. This includes setting the header and configuring the endpoint:
- Configure the OTLP exporter to add a header (
api-key) whose value is your Account License Key.
- Configure the endpoint for the exporter to point to New Relic. You'll receive the endpoint URL when you sign up for the pre-release program.
Now, follow the instructions for your language:
Make sure you are following the instructions for the OTLP gRPC exporter for your language. New Relic doesn't currently support OTLP HTTP exporters.
- ...Find additional OTLP language support in GitHub
The UI for OpenTelemetry has some similarities to the APM agent UI, so if you are familiar with that, you can go right to the UI. If you need help understanding your OpenTelemetry UI options, see View your OpenTelemetry data in New Relic.
After you do your initial setup, check out our best-practices guide for tips about various configurations to improve your use of OpenTelemetry and New Relic.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.