Announcing general availability of New Relic’s native OpenTelemetry support

4 min read

Today, New Relic announces the general availability (GA) of our native support for OpenTelemetry Protocol (OTLP) and OpenTelemetry. New Relic’s native support for OpenTelemetry includes GA support for Trace data and early access support for Metrics and Logs with our OTLP ingest capability.

New Relic’s native support for OTLP in the Telemetry Data platform features a cost-effective, high-performance observability platform that offers a variety of benefits: 

  • Long-term storage
  • Powerful querying of your telemetry data
  • Easy to use dashboards, analytics, and alerting
  • Sophisticated applied intelligence

Combining this with Amazon Web Services (AWS)  Distro for OpenTelemetry (ADOT), which has reached stable status, provides you with a powerful observability solution for your AWS workloads and infrastructure.

OpenTelemetry: the instrumentation standard at New Relic

New Relic has been contributing to and updating our support for the Cloud Native Computing Foundation (CNCF)’s OpenTelemetry open-source project. OpenTelemetry is a set of tools that support instrumenting, generating, collecting, and exporting of metric, log, and trace data. Using this data, you can understand and troubleshoot the performance and behavior of your applications. OpenTelemetry’s specifications for Trace data and the SDKs for Java, .NET, Go, and Python are all at version 1.0 and considered stable. Specifications for Metric and Log data, as well as other language SDKs are continuing to evolve. 

In April, New Relic announced early access availability of native support for OpenTelemetry ingest via OTLP. OTLP is the default transport protocol for OpenTelemetry and it can be used with any OpenTelemetry-compatible telemetry source. With GA of native support for OpenTelemetry, you can now easily ingest your OpenTelemetry data and get complete visibility into your entire stack in one platform.

Get started with OpenTelemetry
OpenTelemetry
Start sending your OpenTelemetry data today

Getting started with OTLP endpoint

Let’s explore how you can import data to New Relic with an OpenTelemetry SDK or collector. It requires only a few steps. 

  1. Point your OTLP exporter at the New Relic OTLP endpoint otlp.nr-data.net:4317.
  2. Add a header attribute, api-key, whose value is the Account License Key for the New Relic account you want to send your data to. 

Here’s what that might look like in the otel-config.yaml file if you’re using an OpenTelemetry collector:

exporters:
 otlp:
   endpoint: otlp.nr-data.net:4317
   headers:
     api-key: ${NEW_RELIC_LICENSE_KEY}

For more information, check out the OpenTelemetry quick start documentation.

Using AWS with New Relic

If you’re running your workloads on AWS, AWS has made it even faster to get started with OpenTelemetry by providing instructions and pre-built packages with their AWS Distro for OpenTelemetry. You can find those under AWS OTel Collector on Github. For example, here’s how to get started with the collector using Docker Compose. If you’re using EC2, you’ll need to install Docker and Docker Compose first.

Following those instructions will get data flowing into AWS X-Ray and Amazon Cloudwatch. To send the metric and trace data from the Java sample application to New Relic, you’ll need to add an entry for the default OTLP exporter, and configure it to use the New Relic OTLP endpoint and your api-key. Then configure the metric and trace pipelines to use the OTLP exporter.  

Here’s what that looks like:

  • Copy the example collector configuration file and Docker Compose configuration file:

    curl https://raw.githubusercontent.com/aws-observability/aws-otel-collector/f854aa0cd7aa6aab1f74e0c4853a6bef12a07aba/examples/docker/config-test.yaml -o config-test.yaml

    curl https://raw.githubusercontent.com/aws-observability/aws-otel-collector/2ea80690ddf0491cd25a94d37c4c8b55f88971f1/examples/docker/docker-compose.yaml -o docker-compose.yaml

  • Add the OTLP entry described above with the New Relic OTLP endpoint and api-key header to the exporters section of the collector configuration file, config-test.yaml.  The exporters section will then look like this:
exporters:
  logging:
    loglevel: debug
  otlp:
    endpoint: otlp.nr-data.net:4317
    headers:
      api-key: <your_new_relic_api_key>
  awsxray:
  ...
  • Then add the OTLP exporter to the list of exporters for the traces and metrics pipelines.  The pipelines section will then look like:
service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [awsxray,otlp]
    metrics:
      receivers: [otlp]
      exporters: [awsemf,otlp]
  • Configure your AWS credentials in docker-compose.yaml as per the instructions.
  • Start the collector, sample app, and traffic generator using Docker Compose:

docker-compose up

After a few seconds, you should see a new AOCDockerDemoService show up in the list of entities in New Relic One. It will be listed along with any other entities and observability data, whether the data came from OpenTelemetry, a New Relic agent, or a wide variety of other open source tools and technologies.

Select the entity from the list and quickly see a summary of the response time, throughput, and error rate for the service.

New Relic One dashboard with OpenTelemetry

Performance broken down by transaction (endpoint) and database query is also available, along with a breakdown of errors, for troubleshooting service problems.

You can also go to distributed tracing and dive deeper into the OpenTelemetry trace data, as shown in the following images.