phoenix
phoenix copied to clipboard
Emit telemetry span events for channel join and handle_in
This PR adds telemetry span events for Phoenix.Channel join/3 and handle_in/3 callbacks. The new events help with instrumenting channels with distributed traces (e.g. via OpenTelemetry).
The following new events were added:
[:phoenix, :channel, :join, :start][:phoenix, :channel, :join, :stop][:phoenix, :channel, :join, :exception][:phoenix, :channel, :handle_in, :start][:phoenix, :channel, :handle_in, :stop][:phoenix, :channel, :handle_in, :exception]
I haven't added documentation for the events yet, as I want to understand if this is something that the Phoenix team would accept as a feature, and if yes, what metadata to include the events.