• Log in

OpenTelemetry traces: Best practices

Familiarize yourself with these OpenTelemetry trace topics to ensure your traces and spans appear in New Relic.

Important

As the OpenTelemetry Protocol matures and more components are declared stable, we intend to move the version supported by our OTLP endpoints from v0.10.0 to a more recent release, at least v0.16.0, before September 2022.

Additional communication will be forthcoming regarding the EOL timeline for v0.10.0 support and actions you can take to minimize disruption as the community moves toward a more stable release of OTLP.

Required fields

The startTimeUnixNano and endTimeUnixNano fields on spans are required according to the OpenTelemetry protocol for trace data. When startTimeUnixNano is not present, the span is dropped and a NrIntegrationError is created. When endTimeUnixNano is not present, the duration of your span is large and negative.

The timeUnixNano field on span events is required. When timeUnixNano is not present, the span event is dropped and a NrIntegrationError is created.

The traceId and spanId fields on spans are required according to the OpenTelemetry protocol for trace data. When traceId or spanId are not present, the span is dropped and a NrIntegrationError is created.

Sampling

Trace data is the most mature OpenTelemetry data type. Because of this, New Relic's OpenTelemetry user experience is largely based on trace data and is therefore influenced by your sampling strategy.

You can configure sampling in a number of places:

  • Service: Use the OpenTelemetry SDK for your language.
  • Collector: If you're running your own instance of the OpenTelemetry collector, you can configure it to do more sophisticated forms of sampling, such as tail-based sampling (see below).

Check out this documentation about how to configure different types of sampling:

Copyright © 2022 New Relic Inc.

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