opentelemetry-erlang-contrib
opentelemetry-erlang-contrib copied to clipboard
Add LiveView async wrapper functions for process propagation in OpentelemetryPhoenix
This adds helper macros to add process propagation to the LiveView async macros. It follows the same in-place replacement as OpentelemetryProcessPropagator.Task and OpentelemetryOban.
I wonder if there should be _with_span and _with_linked_span versions like the task module in process propagator?
Resolves: https://github.com/open-telemetry/opentelemetry-erlang-contrib/issues/302
Turning this to draft until I can figure out how to make this not depend on :phoenix_live_view as per https://github.com/open-telemetry/opentelemetry-erlang-contrib/pull/433#issuecomment-2547269703:
Our instrumentation libraries cannot include dependencies on the library being instrumented. There are a few reasons for this but as you come up with ideas or proposals just know that is a hard constraint.
Maybe this should be a propagator library instead? Fits better with the process propagator library (in that case oban/req will probably need to be the same).