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

fix: add exceptions to sinatra spans. #133

Merged
merged 8 commits into from
Oct 11, 2022

Conversation

scbjans
Copy link
Contributor

@scbjans scbjans commented Oct 3, 2022

This will add any caught Sinatra exceptions to the Span.

Fixes: #56

(edit: updated screenshot so that it correctly reflects outcome of this PR: only server side errors will mark a span as in error and attach an exception to the span.)
Screenshot 2022-10-05 at 08-41-43 Jaeger UI

@scbjans
Copy link
Contributor Author

scbjans commented Oct 3, 2022

Although the screenshot shows a span in error; I've removed that commit from this PR, since that should be handled in the Rack middleware.
If that is indeed the case; I'm happy to look into that in a separate PR.

edit: the screenshot is not accurate anymore; as of now a span is marked as in error with addition of the exception to the span whenever it has a server error, HTTP > 500

Copy link
Collaborator

@arielvalentin arielvalentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Please see my comments about limiting what exceptions we record.

scbjans and others added 5 commits October 4, 2022 13:21
…atra_test.rb

Co-authored-by: Ariel Valentin <arielvalentin@users.noreply.github.com>
…atra_test.rb

Co-authored-by: Ariel Valentin <arielvalentin@users.noreply.github.com>
Copy link
Contributor

@ahayworth ahayworth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

Sinatra instrumentation does not add caught exceptions to the span
3 participants