Tracing
🕓 10 minutes
What you’ll learn​
This tutorial details how to use tracing for monitoring, analysing, debugging, and optimising your code. Tracing helps you to:
- detect failures and the place where they occur;
- and understand what causes the poor performance of the application.
Prerequisites​
Steps​
- Find the "Logging&Tracing" section in the sidebar menu and go to the "Tracing" option.

- Here you have different ways of finding an application component:
- you can search your application components by traceID;
- or you can search through the expandable menu.

- Search by
traceID
.
- First, get the
traceID
. - Open the chosen application component in the browser, make a request in swagger, and copy the
traceID
from the response:



- Paste the
traceID
into the search field and click on the "Search" button.

- There you will find the analysis of the tracing system in the chosen application:

- Search through the expandable menu
- You can click through this menu and find the trace that you are looking for:

- There you will find the analysis of the tracing system in the chosen application:

- Once you've got the results, you can expand each of them to see more details:

- You can click on "Logs for this span" button to see all logs for this component:

- You can also add |="your_trace_id" (for example: |="8f23f1ac55bd287553370fdd783f88a8") after the log command that you've already had. This will show all logs for this component only for this
traceID
.

- You can also use the search field to find the specific component. Result will be highlighted in yellow:

- Here we described basics of using Tracing in Grafana. For more details visit: https://grafana.com/docs/grafana/v7.4/explore/trace-integration/