Skip to content

Commit

Permalink
Made updates based on feedback from SMEs: separate errors from except…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
rhetoric101 committed Aug 30, 2021
1 parent 2560018 commit 832383a
Showing 1 changed file with 29 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,101 +32,44 @@ After you click on a service in the **Explorer** tab, you see the **Summary** pa

In **Distributed tracing**, you can locate traces and examine span details:

1. If you don't see the traces you want, you can run queries like these in the filter bar:
1. To narrow the search for 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.

<Callout variant="tip">
For more ways to filter traces, see our [distributed tracing UI page](/docs/understand-dependencies/distributed-tracing/ui-data/understand-use-distributed-tracing-ui).
</Callout>

2. When you find an interesting trace, click on it to show 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.
4. To view error details for a span with `otel.status = ERROR`, click **Error details** in the right pane.
#### View spans with errors

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

![Screenshot showing the right pane with Error details section](./images/error-details.png)
5. To view exception span events for a span:
* Click **View span events** in the right pane.
* Filter by exceptions using the toggle **Only show exceptions**.
![Screenshot showing span events and how you can filter exceptions.](./images/span-events-exceptions.png)

Span-level errors show you where errors originated in a process, how they bubbled up, and where they were handled. Every span that ends with an exception is shown with an error in the UI and contributes to the total error count for that trace.

Here are some general tips about understanding span errors:

* Spans with errors are highlighted red in the distributed tracing UI. You can see more information on the **Error Details** pane for each span.
* All spans that exit with errors are counted in the span error count.
* When multiple errors occur on the same span, only one is written to the span in this order of precedence:
* A `noticeError`
* The most recent span exception

This table describes how different span errors are handled:

<table>
<thead>
<tr>
<th style={{ width: "200px" }}>
Error type
</th>

<th>
Description
</th>
</tr>
</thead>

<tbody>
<tr>
<td>
Spans ending in exceptions
</td>

<td>
An exception that leaves the boundary of a span results in an error on that span and on any ancestor spans that also exit with an error, until the exception is caught or exits the transaction. You can see if an exception is caught in an ancestor span.
</td>
</tr>

<tr>
<td>
Notice errors
</td>

<td>
Errors noticed by calls to the agent `noticeError` API or by the automatic agent instrumentation are attached to the currently executing span.
</td>
</tr>

<tr>
<td>
Response code errors
</td>

<td>
Response code errors are attached to the associated span, such as:

* Client span: External transactions prefixed with `http` or `db`.
* Entry span: In the case of a transaction ending in a response code error.

The response code for these spans is captured as an attribute `httpResponseCode` and attached to that span.
</td>
</tr>
<tr>
<td>
OpenTelemetry Errors
</td>

<td>
Exceptions containing the following are displayed in the **Error Details** box of the right pane:
* `otel.status = ERROR` displays the span as having an error.
* `otel.status_code` displays the status code.
* `otel.status_description` displays the error description.

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](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#add-events), you can view them in the New Relic UI. Span events have two general types:
* Exceptions
* Non-exceptions (for example, logs)

To view all span events:
1. Click on a span in the waterfall view.
2. In the right pane, click **View span events**.

![Screenshot showing the right pane with Error details section](./images/view-span-events.png)

3. When you're in span events, slide the toggle **Only show exceptions** if you only want to view exceptions.
![Screenshot showing span events and how you can filter exceptions.](./images/span-events-exceptions.png)

<Callout variant="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. You can view OpenTelemetry span event exceptions by clicking **View span events** in the right pane.
</Callout>
</td>
</tr>
</tbody>
</table>
<Callout variant="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.
</Callout>

### Transactions [#trx]

Expand Down

0 comments on commit 832383a

Please sign in to comment.