-
-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
before_send
and before_send_transaction
's return value ha…
…ndling (#2504) * Require testing support files explicitly instead of Dir.glob - It's usually better to require files explicitly when the number of files is manageable. Given that we only need 2 at the moment, I don't think it's worth using Dir.glob. - Also, using Dir.glob causes it to load the Rakefile, which is for isolated testing and it actually initializes the SDK with the wrong configuration in other tests. * Warn when before_send and before_send_transaction callbacks return non-events Currently, if the callbacks return non-event and non-nil values, they'd cause exceptions during serialization, which are rescued and ignored, without explicit logging. This commit adds additional checks to the return values so the users get warnings and also avoids the unnecessary exceptions. * Update changelog * Update sentry-ruby/lib/sentry/client.rb Co-authored-by: Peter Solnica <[email protected]> --------- Co-authored-by: Peter Solnica <[email protected]>
- Loading branch information
Showing
4 changed files
with
53 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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