This project contains examples illustrating usage of OpenTelemetry with New Relic.
- Clone this repo.
- Follow the directions in the README of the example that you are interested in.
- Collector
- OpenTelemetry Collector with OTLP Export to New Relic: Run the OpenTelemetry Collector with OTLP gRPC export to New Relic.
- Kubernetes Collector Tail Based Sampling: Configure a Kubernetes environment to do tail based sampling with the Collector before exporting to New Relic.
- Java
- OpenTelemetry Agent New Relic Config: A Java application with the OpenTelemetry Agent configured for New Relic.
- OpenTelemetry Autoconfigure New Relic Config: A Java application using autoconfigure options to configure export to New Relic.
- Logs In Context With Log4j2: A Java application configured to include OpenTelemetry trace context on Log4j2 structured logs.
- OpenTelemetry with New Relic Distributed Tracing: Demonstrate distributed tracing for applications instrumented with OpenTelemetry and the New Relic java agent.
- OpenTelemetry SDK New Relic Config: A Java application with OpenTelemetry standalone library instrumentation as well as custom instrumentation, configured for New Relic via the SDK. Demonstrates usage of spans, metrics, and logs.
- OTLP New Relic Mapping: Contains a variety of test cases demonstrating how OTLP payloads are mapped to records in NRDB upon ingest.
- OTLP Load Generator: A Java application that generates OTLP span and metric data.
- Spring Initializr with OpenTelemetry: Add OpenTelemetry instrumentation to a Spring Initializr application.
- JavaScript
- OpenTelemetry SDK New Relic Config - OTLP/gRPC: An express application demonstrating OpenTelemetry auto-instrumentation and exporting with OTLP/gRPC, configured for New Relic via the SDK.
- OpenTelemetry SDK New Relic Config - OTLP/HTTP (PROTO): An express application demonstrating OpenTelemetry auto-instrumentation and exporting with OTLP/HTTP (PROTO), configured for New Relic via the SDK.
- Python
- OpenTelemetry SDK New Relic Config: Two simple Python applications demonstrating OpenTelemetry instrumentation, one with Flask auto-instrumentation and one without Flask. Configured for New Relic via the SDK.
- AWS Lambda
- OpenTelemetry Lambda .NET New relic Config: An example AWS .NET Lambda function instrumented with OpenTelemetry.
- OpenTelemetry Lambda Java New relic Config: An example AWS Java Lambda function instrumented with OpenTelemetry.
We encourage your contributions to improve newrelic-opentelemetry-examples
! Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.
If you have any questions, or to execute our corporate CLA (which is required if your contribution is on behalf of a company), drop us an email at [email protected].
A note about vulnerabilities
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.
If you would like to contribute to this project, review these guidelines.
To all contributors, we thank you! Without your contribution, this project would not be what it is today.
newrelic-opentelemetry-examples
is licensed under the Apache 2.0 License.
newrelic-opentelemetry-examples
also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.