Request Metadata in Profiles Python & Native
Hello! I have been working on this profiler and am curious on thought surrounding attaching metadata (trace ID, request ID, span ID). I can now filter by pod, container, service, but I would love to see a request based filter for my services.
I read the existing PR (https://github.com/open-telemetry/opentelemetry-ebpf-profiler/issues/388) using the goroutine/pprof combination and it makes sense. But I am curious how this idea would extend to native and Python.
I read a bit into this and some topics like TLS, strobemeta, uprobes, and context vars (for python) came up and am curious about overall thoughts on the direction to take this or if something was in the works.
Thank you!
There is already the interpreter/apmint plugin to record native spans from Elastic APM. And the draft PR #418 has alternative native labeling library support, but it'd need to be rebased and reviewed. But in both cases they depend on having an additional ELF .so with a thread local storage (TLS) variable setup by the program which is then captured.
For Pyhton, I am not sure what is supported by the CPython interpreter. If a similar mechanism exists, contributions to support are welcome.
With Sharing Resource Attributes with the OpenTelemetry eBPF Profiler and Sharing Thread-Level Information with the OpenTelemetry eBPF Profiler @elsakeirouz, @Gandem and others are also working on a successor to interpreter/apm. Maybe this can be used as base at some point for Python as well.