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#

  1. Find the "Logging&Tracing" section in the sidebar menu and go to the "Tracing" option.
go_to_lib

  • 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.
go_to_lib

  1. 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:
go_to_lib

go_to_lib

go_to_lib

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

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

  1. Search through the expandable menu
  • You can click through this menu and find the trace that you are looking for:
go_to_lib

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

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

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

  • 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.
go_to_lib

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

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

What's next?#

See our other manuals: