Skip to content

Commit

Permalink
Set error on a span with an unhandled :erlang.exit()
Browse files Browse the repository at this point in the history
  • Loading branch information
erszcz authored and marcdel committed Jul 3, 2024
1 parent d4069c2 commit dfb01a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/open_telemetry_decorator.ex
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ defmodule OpenTelemetryDecorator do
e ->
O11y.record_exception(e)
reraise e, __STACKTRACE__
catch
class, reason ->
O11y.set_error("#{class}:#{reason}")
:erlang.raise(class, reason, __STACKTRACE__)
after
O11y.end_span(parent_span)
end
Expand Down

0 comments on commit dfb01a3

Please sign in to comment.