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

Set up your own app or service with OpenTelemetry

OpenTelemetry is a toolkit you can use to gather telemetry data from your apps or services and then export that data to New Relic. If you're familiar with OpenTelemetry and are ready to start setting up your app or service, you're in the right place.

If you'd rather try out OpenTelemetry on a demo app, or see other setup options, see How to get started with OpenTelemetry.

The following five steps will help you instrument your own app or service with OpenTelemetry:

Instrument your app or service with OpenTelemetry

To help you get started with instrumentation, OpenTelemetry provides language-specific products and SDKs. Many languages offer out-the-box instrumentation for common libraries and frameworks. Each language also provides an API to help you manually instrument your code to gather telemetry.

Go to the repository for your language and follow the instructions to instrument your code. When you're done, return here to complete Step 3: Review configurations for exporting telemetry data to New Relic.

Review configurations for exporting telemetry data to New Relic

Exporting telemetry data relies on the OpenTelemetry Protocol, or OTLP for short. This 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.

Before you can export your telemetry data, you need to have your ingest license key and the appropriate OTLP endpoint. We recommend pasting this information in a text file, as you’ll need both in the following steps. You have two choices for exporting data to New Relic via OTLP:

  • Directly from your app:

    The OTLP exporter in your app or service can export directly to the New Relic OTLP receiver.

  • Export from an OpenTelemetry Collector:

    You can set up the collector as a gateway that receives, processes, and exports to the New Relic OTLP receiver. Alternatively, you can set up the collector as an agent that runs with your application or runs on the same host.

Whether you export directly from your app or from a collector, you'll need to:

  1. Be ready to configure the OTLP exporter to add a header (api-key). The value is the license key for the New Relic account you want to send data to.
  2. Based on your integration, be ready to configure the endpoint where the exporter sends data to New Relic. Endpoints are region-specific, so use the one where your New Relic organization is based. For example, if you're using the EU data center region, use an EU endpoint. Use the table below as a guide, and see the additional considerations about ports and endpoints.

Ports and endpoints





Supported Ports

API header name

API header value

TLS encryption required



443, 4317, 4318


License key



443, 4317, 4318


License key

(See FedRAMP compliance for more information)


443, 4317, 4318


License key

Infinite Tracing
(See best practices for endpoint details




License key

Complete the export configuration steps

Now that you are familiar with the New Relic-specific configurations for exporting, you have two options:

  • Export directly to New Relic from your apps
  • Export to New Relic from a collector

Export directly to New Relic from your apps

Click on the link below for your language and complete the configuration steps. When you're done, return here to complete Step 5. View your data in the New Relic UI.

Export to New Relic from a collector

You can set up the collector in different ways and for different purposes. If you need general information about the collector before getting into the setup, see our introduction.

Choose one of the following to see examples for setting up your collector to export.

View your data in the New Relic UI

Once you've instrumented your app or service and configured it to export its data to New Relic, watch the New Relic UI for your traces, metrics, and logs.

The UI for OpenTelemetry has some similarities to our APM UI, so if you are familiar with that, you can go right to the UI. If you need help understanding your OpenTelemetry UI options or how to make sure your data appears in the UI, see View your OpenTelemetry data in New Relic.

Did this doc help with your installation?

Unsupported specifications

New Relic currently supports opentelemetry-specification v1.8.0 with a few exceptions:

  • Successful responses from New Relic have no response body, instead of a Protobuf-encoded response based on the data type. New Relic also responds with success after authenticating, before decoding and validation.
  • Failure responses from New Relic do not include Status.message or Status.details, since OTLP clients don't use the Status object.

What's next?

After you're done with your initial setup, check out our End-to-end implementation guide and our other best practice guides. These will help you optimize your use of OpenTelemetry.

Copyright © 2024 New Relic Inc.

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