OpenTelemetry is an emerging standard for service-level instrumentation. Because it has not yet reached 1.0 for any language, the OpenTelemetry SDK, APIs, and instrumentation are subject to change.
If you're using a New Relic OpenTelemetry exporter, but you're not seeing the data you expect, this guide should help.
OpenTelemetry currently supports two telemetry types: distributed traces and metrics. Through the New Relic UI, you can see your traces and metrics, as well as a view that focuses on errors. Learn more about how to find your data.
If you haven’t already, install the New Relic exporter and OpenTelemetry SDK for your language. Instructions vary by language. With that, you can make calls to the OpenTelemetry API to record traces and metrics.
If OpenTelemetry supports auto-instrumentation for your language, you can include that artifact so that you don’t have to call the OpenTelemetry API. The auto-instrumentation artifact will automatically instrument a number of popular frameworks and libraries. In the near future, New Relic will provide a single bundle to download with auto-instrumentation. For now, see the OpenTelemetry site for details for your language.
Entity not found
If your OpenTelemetry SDK logs an error, or you can’t find your service in the New Relic entity explorer, check that you have configured your Insert API key and service name in your New Relic exporter. See the language-specific exporter documentation for how to do this. If you're still having trouble, turn on logging in the New Relic Telemetry SDK.
While it introduces more complexity, you can send your data through the OpenTelemetry collector. To do so, configure your OpenTelemetry SDK
service.name as a resource and configure the SDK to send data to the collector. Then configure the collector with the New Relic exporter for Go with your Insert API key. Consult the collector documentation if you're having trouble sending data through the collector.
Once OpenTelemetry is configured with the API key and service name, you should be able to find your service in the entity explorer. Select your service to view its summary page.
When viewing your OpenTelemetry data, on the left side of the UI you can select Distributed tracing to see distributed traces. If you don’t see traces:
- Ensure your service was reporting during the time window.
- Ensure you've added OpenTelemetry API calls to create trace spans.
- If you're using OpenTelemetry auto-instrumentation, ensure the instrumentation supports the libraries and frameworks you're using.
Traces are the most mature telemetry type in OpenTelemetry, so you'll find the richest performance information from traces.
Our trace UI will only reflect the data sent to us. This means that throughput and other counts may not reflect the unsampled data.
You can configure sampling application-side using the OpenTelemetry SDKs. If you enable our Infinite Tracing feature, you have the option to send us all of your trace data and use New Relic sampling.
Note that New Relic may rate-limit trace data.
When viewing your OpenTelemetry data, on the left side of the UI you can select Metrics explorer to visualize metrics and create dashboards. If you don’t see metrics, you may need to add OpenTelemetry API calls to add the metrics that you care about.
The OpenTelemetry standard for metric naming is still being defined and to date most instrumentation includes trace spans but not metrics. We expect that more instrumentation will include metrics in the coming months.
When viewing your OpenTelemetry data, on the left side of the UI you can select Errors to understand what errors your service is generating. The count of errors is based on how many traces have a span with the attribute
error.stack. If you don’t see the errors listed that you expect to see, check that your instrumentation sets the following three attributes:
In order for the error to be listed, a span must have an attribute that starts with
The OpenTelemetry standard for representing errors in traces and metrics is still being defined so these attribute names are subject to change. We expect the specification to be frozen very soon.