AWS Distro for OpenTelemetry is a secure, production-ready open source distribution that gives AWS users a streamlined path to instrument their applications with OpenTelemetry. Previously, we partnered with AWS to package our proprietary exporter. We now support OTLP ingest natively, so you can easily send data collected by the AWS Distro for OpenTelemetry to New Relic using the OTLP exporter.
AWS Distro for OpenTelemetry includes the AWS OpenTelemetry SDKs, the Java auto instrumentation agent, and the OpenTelemetry collector, which includes our exporters.
The OpenTelemetry Collector provides a vendor-agnostic implementation for receiving, processing, and exporting telemetry data; it’s the default location for instrumentation libraries to export telemetry data. It removes the need to run, operate, and maintain multiple collectors. Instead, it gives you the tools you need to send open source observability data to any backend, regardless of format.
You can run the AWS OpenTelemetry Collector in your environment as a sidecar or daemonset for EKS, a sidecar for ECS, or an agent on EC2. In this post, we’ll show you how to send data collected by AWS Distro for OpenTelemetry to New Relic, where you can analyze your data with our curated experience for OpenTelemetry.
Using the New Relic exporters in AWS Distro for OpenTelemetry
In this example, we'll walk through how to instrument a sample Java application using AWS Distro for OpenTelemetry and send data to New Relic by configuring the exporters. To follow along, use your own application or use the Spring Pet Clinic to experiment.
Step 1. Download the OpenTelemetry instrumentation agent and collector
- Download the latest release of the Java instrumentation agent from AWS Distro for OpenTelemetry
- Get the latest version of the OpenTelemetry Collector from AWS Distro for OpenTelemetry.
- Install the collector.
Step 2. Configure New Relic as the backend in the OpenTelemetry Collector
To configure New Relic as the backend, modify the collector-config.yaml
file as shown.
Note: You’ll need your New Relic Insights Insert API key.
--- receivers: otlp: protocols: grpc: exporters: otlp: api-key: {YOUR-SECRET-API-KEY} service: pipelines: traces: receivers: [otlp] exporters: [otlp]
After configuring the OpenTelemetry Collector, run it using one of the available options.
Step 3. Start your application and analyze OpenTelemetry data on New Relic.
Set the OTEL_RESOURCE_ATTRIBUTES
environment variable to include the service name and the OTEL_EXPORTER
environment variable to otlp
:
OTEL_RESOURCE_ATTRIBUTES=service.name=*AppName* OTEL_EXPORTER=otlp
The agent forwards the data to the collector. The collector is configured to use the OTLP receiver and the OTLP exporter to send the trace data to New Relic.
Start running your application with the OpenTelemetry Java agent by passing the -javaagent
flag to the JVM:
java -javaagent:aws-opentelemetry-agent.jar -jar target/*.jar
Once the application is running, you can use our curated OpenTelemetry UI to start analyzing the data. The following example shows a snapshot of the top 20 time-consuming transactions for the Spring Pet Clinic application:
You can also filter and group this data by AWS metadata that AWS Distro for OpenTelemetry collects, thereby quickly identifying any transactions that could be the issue’s source.
Similarly, the attributes section for each span in the distributed tracing UI shows you the AWS metadata and provides the context for understanding and troubleshooting issues quickly.
AWS Distro for OpenTelemetry lets you instrument your applications once and send metrics, traces, and metadata from AWS resources and managed services to New Relic One. With New Relic One, you can visualize, analyze, and correlate the application performance data with underlying infrastructure data, reducing the mean time to problem resolution. To learn more about the AWS Distro for OpenTelemetry, visit our developer portal.
Sign up for New Relic’s free tier and start ingesting your OpenTelemetry data today.
이 블로그에 표현된 견해는 저자의 견해이며 반드시 New Relic의 견해를 반영하는 것은 아닙니다. 저자가 제공하는 모든 솔루션은 환경에 따라 다르며 New Relic에서 제공하는 상용 솔루션이나 지원의 일부가 아닙니다. 이 블로그 게시물과 관련된 질문 및 지원이 필요한 경우 Explorers Hub(discuss.newrelic.com)에서만 참여하십시오. 이 블로그에는 타사 사이트의 콘텐츠에 대한 링크가 포함될 수 있습니다. 이러한 링크를 제공함으로써 New Relic은 해당 사이트에서 사용할 수 있는 정보, 보기 또는 제품을 채택, 보증, 승인 또는 보증하지 않습니다.