opentelemetry-erlang-contrib/instrumentation
Derek Kraan ddb2d3b963
Only attempt to record an exception if there is an active span. (#37)
There is an edge case, if you use `forward/4` and use Plug.ErrorHandler,
then when an exception reaches the outer router, then Plug.send_resp
will be called, triggering `[:phoenix, :endpoint, :stop]`, and the span
will be gone by the time the outer router gets the exception. This
causes this telemetry handler to crash and be detached.

Sequence of events:
- [:phoenix, :endpoint, :start]
- [:phoenix, :router_dispatch, :exception] (inner router)
- [:phoenix, :endpoint, :stop]
- [:phoenix, :router_dispatch, :exception] (outer router) ** here there is no span, crashes
2022-03-18 05:21:26 -06:00
..
opentelemetry_cowboy Otel 1.0 support (#57) 2022-01-04 18:58:06 -07:00
opentelemetry_ecto Add idle_time measurement (#66) 2022-03-14 10:22:22 -06:00
opentelemetry_oban Otel 1.0 support (#57) 2022-01-04 18:58:06 -07:00
opentelemetry_phoenix Only attempt to record an exception if there is an active span. (#37) 2022-03-18 05:21:26 -06:00
opentelemetry_redix Add OpenTelemetry integration to Redix (#29) 2022-01-04 14:39:19 -07:00