grafana / explore-logs

Repo for the Loki log exploration app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glance: show Trace summary on for a TraceID

matryer opened this issue · comments

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.

  • while we continue to investigate where we might show attached context in the UI, we could start with a hover pane
  • request will take 1s - so it should be initiated by the user
  • could the user choose a stack and we use that to discover which datasource to get the TraceID info from? (i.e. can we automate it and avoid a preference/manual mapping)
  • we can defer the decision about where this component would live - do whatever is easiest for now

cc @mdisibio @joe-elliott to provide necessary traceQL

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