Skip to content

impr: Record client report when dropping in beforeSendLog#7379

Merged
philipphofmann merged 3 commits intogetsentry:mainfrom
antigluten:anti/record-dropped-log-event
Feb 5, 2026
Merged

impr: Record client report when dropping in beforeSendLog#7379
philipphofmann merged 3 commits intogetsentry:mainfrom
antigluten:anti/record-dropped-log-event

Conversation

@antigluten
Copy link
Copy Markdown
Contributor

@antigluten antigluten commented Feb 5, 2026

📜 Description

The SDK must record a client report with kSentryDiscardReasonBeforeSend when it drops a log in beforeSendLog.
We should tackle this issue after merging #7334, as this PR moves beforeSendMetric to a different location.

#skip-changelog

💡 Motivation and Context

Resolves #7336

💚 How did you test it?

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 5, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

Copy link
Copy Markdown
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot. Please also add a test for this in the SentryClient tests and add an entry to the changelog.

Copy link
Copy Markdown
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @antigluten

@philipphofmann
Copy link
Copy Markdown
Member

@cursoragent review
@sentry review

@philipphofmann philipphofmann added the ready-to-merge Use this label to trigger all PR workflows label Feb 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.249%. Comparing base (18c94be) to head (7d5c9f4).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7379       +/-   ##
=============================================
+ Coverage   85.223%   85.249%   +0.025%     
=============================================
  Files          478       478               
  Lines        28580     28582        +2     
  Branches     12430     12434        +4     
=============================================
+ Hits         24357     24366        +9     
+ Misses        4177      4169        -8     
- Partials        46        47        +1     
Files with missing lines Coverage Δ
Sources/Sentry/SentryClient.m 98.214% <100.000%> (+0.006%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18c94be...7d5c9f4. Read the comment docs.

@philipphofmann
Copy link
Copy Markdown
Member

@cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@philipphofmann philipphofmann changed the title chore: Record client report when dropping in beforeSendLog impr: Record client report when dropping in beforeSendLog Feb 5, 2026
@philipphofmann philipphofmann enabled auto-merge (squash) February 5, 2026 15:55
@philipphofmann philipphofmann merged commit bd7690b into getsentry:main Feb 5, 2026
260 of 271 checks passed
itaybre added a commit that referenced this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logs: Record client report when dropping in beforeSendLog

2 participants