Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set error on a span with an unhandled :erlang.exit() #148

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

erszcz
Copy link
Contributor

@erszcz erszcz commented Jul 3, 2024

Hi,

Thanks for a great OTel decorator!

The decorator handles Elixir exceptions and errors well, but in the most general case it's possible that we might call some code (possibly in Erlang) that will just :erlang.exit/1,2. In such a case, with the current code, a span is not marked as an error and contains almost no tags, which makes it hard to pinpoint the problem:

Screenshot 2024-07-03 at 12 52 28

With this PR such a span is correctly marked as an error with otel.status_description being set to the Erlang exception class (one of throw, error, or exit) and a reason:

Screenshot 2024-07-03 at 12 53 00

@erszcz erszcz force-pushed the set-span-error-on-unhandled-exit branch from fdd0b9f to 77229df Compare July 3, 2024 11:13
@marcdel
Copy link
Owner

marcdel commented Jul 3, 2024

hell yeah thanks, @erszcz! this is much appreciated. 🫶

@marcdel marcdel merged commit dfb01a3 into marcdel:main Jul 3, 2024
1 check failed
@marcdel
Copy link
Owner

marcdel commented Jul 3, 2024

heading to lunch, but i'll cut a new release in a bit

@erszcz
Copy link
Contributor Author

erszcz commented Jul 4, 2024

Awesome 🎉 Thanks for such a prompt response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants