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.
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.
- Point your OTLP exporter at the New Relic OTLP endpoint
otlp.nr-data.net:4317
. - 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.
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.
다음 단계
- Explore other examples for sending OpenTelemetry sourced data to New Relic.
- Sign up for New Relic’s free tier and start sending your OpenTelemetry data today.
- Interested in helping us further OpenTelemetry and build amazing tools to support it? We’re hiring! Check out our careers page.
이 블로그에 표현된 견해는 저자의 견해이며 반드시 New Relic의 견해를 반영하는 것은 아닙니다. 저자가 제공하는 모든 솔루션은 환경에 따라 다르며 New Relic에서 제공하는 상용 솔루션이나 지원의 일부가 아닙니다. 이 블로그 게시물과 관련된 질문 및 지원이 필요한 경우 Explorers Hub(discuss.newrelic.com)에서만 참여하십시오. 이 블로그에는 타사 사이트의 콘텐츠에 대한 링크가 포함될 수 있습니다. 이러한 링크를 제공함으로써 New Relic은 해당 사이트에서 사용할 수 있는 정보, 보기 또는 제품을 채택, 보증, 승인 또는 보증하지 않습니다.