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

Default to internal_error rather than unknown_error #2473

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

cyberdelia
Copy link
Contributor

@cyberdelia cyberdelia commented Nov 23, 2024

When using sentry-opentelemetry to trace code that isn't related to an HTTP call, the SpanProcessor will set the status of a Transaction to be "unknown_error", which is benign, but within Sentry UI this status is not interpreted as an error at all.

The result is that all the impacted transactions appears to have 0% failure rate, etc. Changing it to "internal_error" prevents this, and also is in line with other sentry SDKs behaviour.

Sidebar: The SpanEvent metadata around exceptions seems to be dropped in the conversion process to Transaction , which is too bad.

Copy link
Collaborator

@solnic solnic left a comment

Choose a reason for hiding this comment

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

This makes sense, thanks. Could you also add a simple spec that covers this change to span_processor_spec.rb?

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.19%. Comparing base (6a46d9f) to head (86d1fd6).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2473   +/-   ##
=======================================
  Coverage   98.19%   98.19%           
=======================================
  Files         128      128           
  Lines        4833     4833           
=======================================
  Hits         4746     4746           
  Misses         87       87           
Components Coverage Δ
sentry-ruby 98.57% <ø> (ø)
sentry-rails 97.07% <ø> (ø)
sentry-sidekiq 97.42% <ø> (ø)
sentry-resque 92.85% <ø> (ø)
sentry-delayed_job 95.65% <ø> (ø)
sentry-opentelemetry 99.31% <100.00%> (ø)
Files with missing lines Coverage Δ
...lemetry/lib/sentry/opentelemetry/span_processor.rb 100.00% <100.00%> (ø)

@cyberdelia
Copy link
Contributor Author

cyberdelia commented Nov 28, 2024

@solnic Done. The new spec cover all type of errors handled by update_span_status, since it was not tested before.

@solnic solnic self-requested a review December 5, 2024 20:00
Copy link
Collaborator

@solnic solnic left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! Please update the top-level CHANGELOG.md too, and I'll be able to merge it in 🙂

@cyberdelia
Copy link
Contributor Author

@solnic Done!

@solnic solnic merged commit 98b30d2 into getsentry:master Dec 19, 2024
135 checks passed
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