-
-
Notifications
You must be signed in to change notification settings - Fork 467
Add callback to record the type and amount of data discarded before reaching Sentry #4612
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
Changes from 6 commits
dd8f7bb
8deac8c
bfb7f0d
1b53c4e
6baf63e
a436bf2
88fbca6
0597870
6e1b2b0
80aa565
900fdd9
ecb41ca
8b18e8f
efcd846
32d5205
edccc48
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,6 +124,18 @@ private void recordLostEventInternal( | |
| @NotNull String reason, @NotNull String category, @NotNull Long countToAdd) { | ||
|
alexander-alderman-webb marked this conversation as resolved.
Outdated
|
||
| final ClientReportKey key = new ClientReportKey(reason, category); | ||
| storage.addCount(key, countToAdd); | ||
| if (options.getOnDiscard() != null) { | ||
| try { | ||
| options.getOnDiscard().execute(reason, category, countToAdd); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There may be duplicate invocations of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment above |
||
| } catch (Throwable e) { | ||
| options | ||
| .getLogger() | ||
| .log( | ||
| SentryLevel.ERROR, | ||
| "The onDiscard callback threw an exception. It will be added as breadcrumb and continue.", | ||
| e); | ||
|
cursor[bot] marked this conversation as resolved.
Outdated
|
||
| } | ||
| } | ||
| } | ||
|
|
||
| @Nullable | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.