Hi @ovidiubuligan. Unfortunately no, but it’s close. The metrics-generator it’s not trace-aware, as it works at the span level, and all the metrics it generates are span-based.
The metrics-generator will record count and latency of all ingested spans, and will attach labels such as service_name (that’s configurable). For example, you could do a latency histogram showing percentiles by executing this query
histogram_quantile(0.99, sum(rate(traces_spanmetrics_latency_bucket{service="my-app"}[5m])) by (le, span_name))
but the results won’t be grouped per traceID, nor the self-time calculated.
Making the metrics-generator work at the trace level would require a decent amount of work, but I still it’s interesting. Please leave an issue if you want.
As alternative, I think this is something that could be possible with TraceQL in the distant future, but not soon I’m afraid :(.