elixir-plug / plug_cowboy

Plug adapter for the Cowboy web server
Other
243 stars 48 forks source link

tracing using opentelemetry #70

Closed dvic closed 3 years ago

dvic commented 3 years ago

Has anyone tried using OpenTelemetry with Cowboy and a Plug? The idea is to have a root span start when cowboy starts a request and a child span for the plug duration. I know I can hook into telemetry events but I need to link the created spans together. What are the ways in which you could pass an OpenTelemetry context up to the plug, or is this simply not possible without forking / using ETS?

Asking for a friend ;) https://github.com/opentelemetry-beam/opentelemetry_phoenix/issues/28

josevalim commented 3 years ago

We emit telemetry events, so I hope that’s enough. I am not familiar with open telemetry to answer the question though, so I would ask there where you asked, the observability WG slack or the forum. :)