Verifies that client is available before sending breadcrumbs#2394
Merged
sl0thentr0py merged 1 commit intogetsentry:masterfrom Sep 16, 2024
Merged
Conversation
During build, we have encountered situations where Sentry wants to send a `breadcrumb` but it fails to accomplish the task because of `NoMethodError: undefined method `configuration' for nil:NilClass`. After one of this error is triggered, Sentry fails to work at all, passing from 0 to several hundred errors in our pipeline, and then back to zero once we start rebuilding. Our pipeline tests using parallelism and there is a ton of concurrency, so we believe that has something to do with it. The backtrace points out to `Hub#add_breadcrumb` and inside of it to `configuration`. It is possible that while the new "local" hub is available, the client is not and fails to work. We have observed that several other method have checks in place to verify that the client is really available but not on `add_breadcrumb` so we added a verification before starting the rest of the process.
df8e4e3 to
038fee8
Compare
Contributor
Can you elaborate more on this? I think this indicates a bigger problem either in your application's Sentry setup OR in the SDK itself. I'd like to check a few things like:
|
sl0thentr0py
approved these changes
Sep 16, 2024
Member
|
@st0012 this is just part of the design problem of the older hub/scopes, we will eventually consolidate into a single OTEL-like context so there will be no more |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2394 +/- ##
==========================================
- Coverage 98.68% 98.67% -0.01%
==========================================
Files 210 210
Lines 13923 13923
==========================================
- Hits 13740 13739 -1
- Misses 183 184 +1
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
During build, we have encountered situations where Sentry wants to send
a
breadcrumbbut it fails to accomplish the task because ofNoMethodError: undefined methodconfiguration' for nil:NilClass`.After one of this error is triggered, Sentry fails to work at all,
passing from 0 to several hundred errors in our pipeline, and then back
to zero once we start rebuilding.
Our pipeline tests using parallelism and there is a ton of concurrency,
so we believe that has something to do with it.
The backtrace points out to
Hub#add_breadcrumband inside of it toconfiguration. It is possible that while the new "local" hub isavailable, the client is not and fails to work.
We have observed that several other method have checks
in place to verify that the client is really available but not on
add_breadcrumbso we added a verification before starting the restof the process.