• EnglishEspañol日本語한국어Português
  • Log inStart now

OpenTelemetry in the UI: Distributed tracing page

After you've sent us your OpenTelemetry data and opened your service (entity) in the UI, you can click Distributed tracing to locate traces and examine span details. For your trace data to appear in the New Relic UI, it needs to conform to the OpenTelemetry trace semantic conventions. Also, in the Traces section of our best practices guide, you can find some tips about making sure your traces and spans appear in New Relic.

The following attributes are typically not added explicitly to spans. Rather, they are usually set when creating a span or performing operations (for example, recording an error) on a span using the OpenTelemetry SDK.

Attribute

Description

name

A span’s name is generally set when starting a span. The name can generally be anything, but the OpenTelemetry specification provides guidance for certain types of spans like Database spans or HTTP spans.

span.kind

A span’s kind is generally set when starting a span. New Relic uses span.kind to infer that a span is an entry point to a given service. When span.kind = server or consumer it is considered an entry point. When span.kind = client or producer, it is considered a call to an external service or database system.

otel.status_code

  • A span’s status is set using the span API. The otel.status_code attribute is how it is manifested by New Relic.
  • The UI primarily uses otel.status_code for the purpose of identifying errors.

Find traces and their associated spans

Here are some ways to target your searches:

  1. To find the traces you want, you can run queries like these in the filter bar:
    • service.name = YOUR_SERVICE_NAME
    • trace.id = YOUR_TRACE_ID
  2. When you find an interesting trace, click on it to display a waterfall diagram showing the spans of the trace.
  3. Click on specific spans within the trace to display span details in the right panel.

Tip

For more ways to filter traces, see our distributed tracing UI page.

View spans with errors

After you click on a span in the trace waterfall view, you can see span errors in the right panel under Error details.

The error details are populated by spans containing otel.status_code = ERROR and display the content of otel.status_description.

To narrow your search for spans with errors, you can enter otel.status_code = ERROR directly in the distributed tracing filter bar.

View span events

If you send span events as described by the OpenTelemetry specification, you can view them in the New Relic UI. Span events have two general types:

  • Exceptions
  • Non-exceptions (for example, logs)

If you have span events, links for these appear in the right pane:

  1. Click on a span in the waterfall view.

  2. In the right pane, click View span events, or you can expand Error details and click the link at the bottom of the errors.

  3. When you're in span events and only want to view exceptions, slide the toggle Only show exceptions.

Tip

OpenTelemetry exceptions handled by the app/service are displayed independently of span error status and are not necessarily associated with a span error status.

To learn about OpenTelemetry in other UI pages, see the UI overview.

Copyright © 2024 New Relic Inc.

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