This lesson is a part of our OpenTelemetry masterclass. If you haven't already, checkout the chapter introduction.
Each lesson in this lab builds on the last one, so make sure you view a summary of your data before proceeding with this one.
Now that you've seen a summary of your OpenTelemetry data in New Relic, take a closer look at your traces.
From the left-hand navigation, select Distributed tracing:
Here, you see some general information about traces in your service. You see the number of traces you receive over time, the duration of those traces, and the number of traces with errors. In the table at the bottom, you see trace groups. These organize your traces, grouping them by their root span.
Click the only available trace group:
At the top, you see traces plotted on a timeline:
At the bottom, you see a chart with data for each of the traces:
Every row in this chart includes the root span’s name, the start time, and duration. It also indicates the number of spans in the trace that have an error status.
Order the table by ascending number of errors and click one of the top traces:
For now, you’re going to view a trace with no errors. You’ll investigate traces with errors in the next lesson.
In this new view, you see the timeline of the spans in your trace:
There are two blue blocks, one for each span. The blue color means that the span does not have an error status.
The top span is the root span. The bottom span is an in-process span. In New Relic, this means that it represents an internal function call, and that it's neither an exit nor entry span for the service.
In the chart below the timeline, you only see the root span. Click it:
In the information panel on the right side of the view, you see granular data about the span.
The tab selected by default shows the performance of spans in your service. It shows data about the duration of spans, the throughput, and more.
Here, you see all the attributes that you set manually, along with attributes set automatically by the OpenTelemetry instrumentation you used. For example, the span’s
opentelemetry and the
service.name is the name of your service.
Notice that you’re still missing some information, such as your attribute,
fibonacci.n, for the
n value your user requested. It’s not listed here because you captured that information in the span for the function that computes the nth fibonacci number, not the root span. To see that, look at your in-process span.
Expand the root span, and toggle Display in-process spans for this service:
Click your in-process span:
This view is the same as the view for your root span but with data for your function instead of the overall request. Under Attributes, you’ll find your custom attributes:
With span attributes, you can understand what happened while your code was running.
In some cases, though, your code may raise exceptions. When you instrumented your application, you handled an exception where the user requested an out-of-bounds fibonacci index.
You can find these error spans in the Distributed tracing view by reordering the rows by Errors:
However, we also provide a dedicated view that filters down these traces for you.
This lesson is a part of our OpenTelemetry masterclass. Continue on to the next lesson: View your error traces.