Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verifies that client is available before sending breadcrumbs (#2394)
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.
- Loading branch information