-
-
Notifications
You must be signed in to change notification settings - Fork 461
Fix log count in client reports #4869
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 all commits
d2a38cc
3bd2cf0
fc4fc35
06f9c6a
9255444
0d9f543
90fb7cc
5ad51bc
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 |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| import io.sentry.SentryEnvelopeItem; | ||
| import io.sentry.SentryItemType; | ||
| import io.sentry.SentryLevel; | ||
| import io.sentry.SentryLogEvents; | ||
| import io.sentry.SentryOptions; | ||
| import io.sentry.protocol.SentrySpan; | ||
| import io.sentry.protocol.SentryTransaction; | ||
|
|
@@ -98,9 +99,19 @@ public void recordLostEnvelopeItem( | |
| reason.getReason(), DataCategory.Span.getCategory(), spans.size() + 1L); | ||
| executeOnDiscard(reason, DataCategory.Span, spans.size() + 1L); | ||
| } | ||
| recordLostEventInternal(reason.getReason(), itemCategory.getCategory(), 1L); | ||
| executeOnDiscard(reason, itemCategory, 1L); | ||
| } else if (itemCategory.equals(DataCategory.LogItem)) { | ||
| final @Nullable SentryLogEvents logs = envelopeItem.getLogs(options.getSerializer()); | ||
| if (logs != null) { | ||
| final long count = logs.getItems().size(); | ||
| recordLostEventInternal(reason.getReason(), itemCategory.getCategory(), count); | ||
| executeOnDiscard(reason, itemCategory, count); | ||
| } | ||
|
Comment on lines
+104
to
+110
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. Bug: 🔍 Detailed AnalysisWhen a 💡 Suggested FixMove the 🤖 Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
| } else { | ||
| recordLostEventInternal(reason.getReason(), itemCategory.getCategory(), 1L); | ||
| executeOnDiscard(reason, itemCategory, 1L); | ||
| } | ||
| recordLostEventInternal(reason.getReason(), itemCategory.getCategory(), 1L); | ||
| executeOnDiscard(reason, itemCategory, 1L); | ||
| } | ||
| } catch (Throwable e) { | ||
| options.getLogger().log(SentryLevel.ERROR, e, "Unable to record lost envelope item."); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.