Verifies that client is available before sending breadcrumbs #2394
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
breadcrumb
but it fails to accomplish the task because ofNoMethodError: 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 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_breadcrumb
so we added a verification before starting the restof the process.