Traces

Trace represents the full path of a single request, from start to finish, across all connected services in your system. It is constructed from multiple spans, which is a single, timed operation within a trace and has attributes, a key-value pair, that provide additional information that can be useful for debugging. By analyzing traces, developers can understand the flow and timing of operations, helping them identify issues in code execution.

Traces Page

The Traces page shows a list of traces and offers flexible queries and filters to help you quickly find the trace you need.

How to Debug

These steps will guide you on how to use Sentry Traces page for debugging your code:

  1. Go to sidebar > Explore > Traces.

  2. Select the project you want to look into.

  1. Filter by the environment name and when it takes place.

  1. Search for specific traces based on attributes like transaction name, span attributes, duration, and more.

  1. You can also save your custom search as a by clicking the `>> Advanced button below the project select button. It will open a sidebar for setting the visualization. Then click the Save as… button and choose to save it as a query.

  1. After you find your desired trace, you can analyze spans to understand the time taken by various parts of your application, helping you optimize performance.

Trace Details

Once you select a trace, you will be directed to the Trace Details page. Here, you will find a comprehensive breakdown of the trace and its spans, visualized in a Gantt chart.

Clicking on a specific span in the chart will reveal the span information such as:

  1. General Data

  1. Additional Data

  1. Trace Data

  1. Body

  1. Headers

  1. Tags & Context

  1. Database Query

Make Searching Trace Easier

Traces page's search feature allows querying a trace based on span attribute values. Adding more searchable span and its attributes makes it easier to find a specific trace. You can follow this Instrumentation tutorial to add more span from a third-party library.

Last updated