opentelemetry-erlang
opentelemetry-erlang copied to clipboard
with_span doesn't call record_exception
I'd expect with_span
to catch errors/exceptions, call record_exception
, set the span status, and then re-raise like it did in OpenCensus.Elixir
. I can't see it happening, though, nor find any mechanism for it.
In the OT world, adding events for exceptions is the default for Python, though they also provide record_exception
and set_status_on_exception
as start options on their start_span so users can opt out. (Note it returns a context manager, so Python's with start_span(…):
is equivalent to our with_span
.)
Only just noticed: record_exception
is Elixir-side-only.
Experiment adding OT Python style opt-out record_exception
and set_status_on_exception
start options on with_span/4
: https://gist.github.com/garthk/fddffdb2880b665c296cab435f216267