opentelemetry-erlang
opentelemetry-erlang copied to clipboard
Instrumented versions of OTP behaviours
In the SIG meeting yesterday @yurishkuro asked about auto-instrumentation, like in Java and others. I realized this is similar to what @ferd and I had discussed at one point making otel_gen_*
behaviours to be used in place of the standard gen_*
modules but that propagate context.
Preferably they would just call the gen_*
modules so no logic/features have to be duplicated, but I the receiving of the messages and unwrapping the context before calling handle_*
will have to be implemented.
I'm also now wondering if adding "context" to OTP so the gen_*
behaviours propagate it could be an acceptable patch to OTP.
This would still leave raw send
to not be automatically propagating context, but this could be a happy middle ground between always propagating some value across processes and having to always do it manually.
Opening this issue to track/discuss ideas, other issues should probably be opened to track implementation of individual behaviours.