grafana / explore-logs

Repo for the Loki log exploration app
GNU Affero General Public License v3.0
295 stars 13 forks source link

glance: show Trace summary on for a TraceID #435

Open matryer opened 4 months ago

matryer commented 4 months ago

I'm open to the exact implementation, and I suspect it will evolve. The idea is to show a summary of the trace right in Explore Logs.

cc @mdisibio @joe-elliott to provide necessary traceQL

joe-elliott commented 4 months ago

To get basic summary information about a trace to display in a hover panel run a query like:

{ trace:id = "<desired id>" }

Pass a limit=1, spss=1 and appropriate start/end parameters (https://grafana.com/docs/tempo/latest/api_docs/#search).

Tempo will return the following metadata which includes all services, span and error counts.

https://github.com/grafana/tempo/blob/2870e82df7045b41c166da4a624ae8d68c0e6394/pkg/tempopb/tempo.proto#L113-L122