OpenTelemetry provides general purpose APIs and SDKs for collecting, processing, and exporting observability data. One of the most popular use cases for these APIs and SDKs is APM monitoring, where instrumentation is installed to monitor an app or service.
This page describes common set up steps for OpenTelemetry based APM monitoring with New Relic.
Before you start
- Sign up for a New Relic account.
- Get the license key for the New Relic account to which you want to report data.
Instrument your app or service with OpenTelemetry
OpenTelemetry provides language-specific APIs and SDKs for instrumenting applications. Most languages provide a rich set of instrumentation for popular libraries and frameworks.
To help you get started, we offer a simple example application in a variety of languages. For each language, the application is built using web framework popular to that language. The examples below demonstrate how to configure:
The service name which will display in New Relic.
The OpenTelemetry Protocol (OTLP) exporter to send data to the New Relic OTLP endpoint.
Additional recommended settings to optimize OpenTelemetry for the best New Relic experience.
For more information about what instrumentation is available and more advanced scenarios, see the relevant OpenTelemetry language documentation.
Important
You can use any language that OpenTelemetry supports to send data to New Relic. However, the examples above reflect only a subset of the supported languages.
Missing your language? Request an example by opening an issue on GitHub!
View your data in the New Relic UI
Once your app is instrumented and configured to export data to New Relic, you should be able to find your data in the New Relic UI:
Find your entity at All entities > Services - OpenTelemetry. The entity name is set to the value of the app's
service.name
resource attribute. For more information on how New Relic service entities are derived from OpenTelemetry resource attributes, see Services.See OpenTelemetry APM UI for more information.
If you can't find your entity and don't see your data with NRQL, see OTLP troubleshooting.
Running New Relic agents and OpenTelemetry tooling in the same process
New Relic agents and OpenTelemetry tooling (SDKs, agents, etc.) are among many APM products on the market.
For a given language, nearly all APM products operate by using the same low-level language and runtime hooks available–most of which alter the behavior of your code at run time. Depending on your language's architecture, this is often achieved via techniques like byte-code manipulation or monkey patching.
Due to the complex ways in which APM products alter your running code, there can be no guarantees that one product will be compatible with another product running in the same process. At best, they’ll live side by side unbeknownst to the other and independently generate telemetry from your application. At worst, they’ll stomp on each other leading to unpredictable behavior.
New Relic cannot make any assurances that our APM agents are compatible with a different APM product running in the same process. We recommend you pick the one (and only one) product that best fits your needs.