parca icon indicating copy to clipboard operation
parca copied to clipboard

Add TraceId based search

Open Pryz opened this issue 3 years ago • 5 comments

Observability super powers come from been able to correlate multiple telemetry. Jumping from one telemetry to another require them to share the same context. Distributed tracing solutions propagate context using a Trace ID. Using the same Trace ID and attaching them to profiles could give a very powerful way of correlating traces and profiles.

Pryz avatar Jan 10 '22 18:01 Pryz

I am interested in this as well. But this sounds more like an instrumentation question to me? I think it is possible to use traceID in pprof labels, but seems this is not a common practice and I don't see anyone else doing it. Would like to hear more people doing such things.

yeya24 avatar Jan 10 '22 18:01 yeya24

+1 to @yeya24 it's mostly an instrumentation problem. The biggest issue I see here is the profiling data is sampling-based and not request scoped. So in a given interval, we might have processed several requests. That being said we would be happy to make life easier for users to achieve this goal by providing an instrumentation library or extending existing libraries.

We can also bounce off some ideas to extend the parca-agent to support this scenario. In theory, we can obtain tracing ids from the network stack using eBPF and we can use these to argument profiles with labels. It's easier said than done of course :D But at least we can start discussing the possibilities here.

kakkoyun avatar Jan 11 '22 08:01 kakkoyun

Agreed that pprof labels are the place for this. Maybe a long shot but we're already walking the stack anyway in eBPF, so I imagine with some languages (like Go) we will probably get pretty far with heuristics like looking for and extracting the trace id from things on the stack (context.Context in the Go case).

brancz avatar Jan 11 '22 08:01 brancz

Pyroscope instead implement this correlation by searching profiles using profile ID from traces. Trace will have profile ID as a tag. https://github.com/pyroscope-io/pyroscope/blob/main/examples/tracing/jaeger/README.md

yeya24 avatar Mar 02 '22 19:03 yeya24

Yeah, I think it should be possible to do it both ways.

brancz avatar Mar 03 '22 09:03 brancz