• /
  • EnglishEspañolFrançais日本語한국어Português
  • Inicia sesiónComenzar ahora

OpenTelemetry API support in New Relic agents

New Relic APM agents now support OpenTelemetry (OTel) APIs, allowing you to instrument your applications using vendor-neutral OpenTelemetry APIs while maintaining full access to New Relic's powerful APM features. This capability gives you the flexibility to write portable instrumentation code without sacrificing the depth of insights and features that New Relic provides.

Benefits

Using OpenTelemetry API support with New Relic agents provides several advantages:

  • Vendor-neutral instrumentation: Write custom instrumentation using standard OpenTelemetry APIs that work across observability platforms
  • No migration required: Enable OTel API support in your existing New Relic agent without replacing your current instrumentation
  • Gradual adoption: Use OpenTelemetry APIs for new custom instrumentation while existing New Relic instrumentation continues to work
  • Mixed-mode compatibility: Seamlessly trace requests across services instrumented with New Relic agents, OpenTelemetry APIs, or pure OTel agents
  • Community instrumentation: Leverage native OpenTelemetry instrumentation for frameworks and libraries

What this feature provides

When you enable OpenTelemetry API support in a New Relic agent, the agent can:

  • Capture spans, traces, metrics, and logs created using OpenTelemetry APIs
  • Integrate OTel-generated telemetry seamlessly into New Relic APM traces
  • Support native OpenTelemetry instrumentation that doesn't conflict with New Relic's built-in instrumentation
  • Maintain trace context across mixed New Relic and OpenTelemetry instrumented services

Importante

This feature is disabled by default. You must explicitly enable it through agent configuration.

Supported languages and features

OpenTelemetry API support is available for the following New Relic APM agents:

Language

Minimum version

Traces API

Metrics API

Logs API

Span links

Events on spans

Java

[9.1.0]

Node.js

[13.13.0]

.NET

[10.49.0]

See note below

Python

[11.5.0]

See note below

Ruby

[10.2.0]

Sugerencia

.NET and Python logs: The .NET agent already uses the logging library that became the OpenTelemetry API for log data. The Python agent already supports the logging module. For backwards compatibility, enabling OpenTelemetry API support does not change how these agents instrument logs.

Sampling in Mixed Environments

All agents now support trace ratio sampling, aligning with OpenTelemetry standards and ensuring consistent sampling logic across mixed environments.

Key benefits:

  • Consistent sampling decisions across New Relic and OTel-instrumented services
  • Preservation of upstream trace decisions from OTel SDKs

For details on how adaptive sampling works, sampling targets per agent, and configuration options, see Distributed tracing sampling.

Supported instrumentation types

Native instrumentation (automatic)

Native OpenTelemetry instrumentation is supported out of the box. These instrumentations are built directly into the library or framework by its maintainer and automatically work when you enable OpenTelemetry API support.

The specific native instrumentations available vary by language agent. See the configuration section for details on which instrumentations are supported for each language.

Importante

Known limitation: Some native instrumentations may produce slightly different span names or metric names compared to New Relic's built-in instrumentation due to differences in OpenTelemetry semantic conventions (for example, Elasticsearch, RabbitMQ).

Custom instrumentation with OpenTelemetry APIs

You can write custom instrumentation using the standard OpenTelemetry APIs:

  • Traces: Create custom spans and add attributes using the OpenTelemetry Tracing API
  • Metrics: Record custom metrics using the OpenTelemetry Metrics API (where supported)
  • Logs: Write logs using the OpenTelemetry Logs API (where supported)

See the OpenTelemetry documentation for details on using these APIs in your language.

How to enable OpenTelemetry API support

OpenTelemetry API support is disabled by default. Enable it through your agent's configuration:

Verify it's working

After enabling OpenTelemetry API support, verify that it's working:

  1. Deploy your application with the updated agent configuration.
  2. If using custom instrumentation, ensure your code is creating spans/metrics using OpenTelemetry APIs.
  3. Generate traffic to your application.
  4. Check your New Relic APM UI:

Limitations and known issues

Instrumentation limitations

Limitation

Description

Library instrumentation not supported

OpenTelemetry library instrumentations that require separate package installation are not supported in this release. Only native instrumentations that are built directly into the library by its maintainer work automatically.

Java bytecode instrumentation not detected

Java OpenTelemetry auto-instrumentation that uses bytecode manipulation will not be detected by the New Relic Java agent.

Semantic convention differences

Some OpenTelemetry instrumentations use different naming conventions for spans and metrics compared to New Relic's built-in instrumentation:

  • Elasticsearch: Span names and operation names may differ in casing and length
  • RabbitMQ: Distributed tracing works differently (span links vs. parent/child relationships)

Sugerencia

These differences may affect existing dashboards and alert conditions that rely on specific span or metric names. Review and update your queries if you switch from New Relic instrumentation to OpenTelemetry instrumentation for these services.

Agent-specific limitations

  • Python: Only Traces API is supported; Metrics and Logs APIs are not available
  • Ruby: Only Traces API is supported; Metrics and Logs APIs are not available
  • .NET: Enabling OpenTelemetry metrics may increase dimensional metric ingest costs

Troubleshooting

OpenTelemetry spans not appearing in traces

If you've enabled OpenTelemetry API support but don't see OTel-generated spans in your traces:

Need help?

If you're experiencing issues with OpenTelemetry API support, please reach out to New Relic Support for assistance.

What's next?

Copyright © 2026 New Relic Inc.

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