-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Hints are now used via a Hints object and passed into beforeSend and EventProcessor as @NotNull Hints object #2045
Conversation
Codecov Report
@@ Coverage Diff @@
## 6.x.x #2045 +/- ##
========================================
Coverage ? 81.06%
Complexity ? 3211
========================================
Files ? 229
Lines ? 11804
Branches ? 1568
========================================
Hits ? 9569
Misses ? 1650
Partials ? 585 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. I only gave it a high level API review.
sentry-samples/sentry-samples-console/src/main/java/io/sentry/samples/console/Main.java
Outdated
Show resolved
Hide resolved
* Store attachments in hints and allow manipulation in beforeSend and eventProcessor * Add changelog * Add tests for breadcrumbs and attachments via hints * Update CHANGELOG.md Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io> * Rename AttachmentContainer to Attachments * Use long for test * Move attachments into Hints * Fix kotlin/java interop for Hints * Convert screenshot from map entry to property * Rename hint name param * Rename clear to clearAttachments * Use kotlin short version access for getScreenshot * Move AttachmentsTest into HintsTest; add param names * Make primitiveMapping table static * Use ArrayList as there should not be a synchronization issue for hints Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io>
📜 Description
Replaces
Map<String, Object>
for hints with aHints
object. Also changed from@Nullable
to@NotNull
inbeforeSend
andEventProcessor
.💡 Motivation and Context
This makes it easier for developers to interact with hints without having to deal with certain cases (e.g.
hints == null
, hints not having an attachment entry, hints having a null attachment entry, ...)See getsentry/sentry-javascript#5036
Here's another PR building on top of this to allow manipulation of attachments via
beforeSend
andeventProcessor
: TODO💚 How did you test it?
Unit Tests, see linked PR
📝 Checklist
🔮 Next steps