Telemetry event for `early_error`
binaryseed opened this issue · comments
There are a category of requests that cowboy
itself will respond to before it invokes the Plug.Cowboy.Handler
, and thus they aren't detectable by any telemetry
instrumentation currently in plug
or plug_cowboy
...
The early_error
cowboy callback is implemented, and a subset of requests are logged:
plug_cowboy/lib/plug/cowboy/stream.ex
Lines 27 to 31 in dc2972f
It would be nice to emit a telemetry
event for these requests so that they aren't lost. They consume real resources, but are currently invisible to any monitoring solution based on the exiting Plug events.
Thoughts @josevalim?
What do you have in mind? A single event for early error?
Yes, we won’t get things like duration, but will be able to get minimal visibility into throughout with a single event.
Sounds good to me!
PR here: #34