Repository navigation
feat!: Add hint support to scope-level event capture - #2099
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
β Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5f5a9a8. Configure here.
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## jpnurmi/ref/attachment-manifest #2099 +/- ##
===================================================================
+ Coverage 75.32% 75.33% +0.01%
===================================================================
Files 103 103
Lines 27922 27939 +17
Branches 5100 5103 +3
===================================================================
+ Hits 21031 21049 +18
- Misses 5556 5559 +3
+ Partials 1335 1331 -4 π New features to boost your workflow:
|
tustanivsky
left a comment
There was a problem hiding this comment.
Just to clarify - do we support hints in before_send for crash events as well? All four backends seem to pass NULL as the hint there π€
Hmm, but sentry-unreal sets EDIT: Which means, do we then need |
Right, for Unreal itβs
Yes, I think it would be good to align what both callbacks carry so downstream SDKs get the same capabilities regardless of which hook handles the event. |
71c5994 to
1c45f3f
Compare
181c744 to
cd28cd8
Compare
Accept hints in `sentry_scope_capture_event` and pass them to `before_send`. Keep `sentry_capture_event` unchanged. Merge hint and scope attachments before `before_send` and `before_send_feedback`, then use the resulting hint attachments in the envelope. Add `sentry_hint_remove_attachment` and `sentry_hint_clear_attachments` to filter attachments without modifying scopes. BREAKING CHANGE: `before_send` callbacks now take `sentry_hint_t *` instead of `void *` for the hint parameter. `sentry_scope_capture_event` now requires a hint argument; pass `NULL` when no hint is needed. Scope attachment changes inside either callback no longer affect the current event; modify the hint instead. Close: #2098
cd28cd8 to
ce10a77
Compare

Accept hints in
sentry_scope_capture_eventand pass them tobefore_send. Keepsentry_capture_eventunchanged.Merge hint and scope attachments before
before_sendandbefore_send_feedback, then use the resulting hint attachments in the envelope. Addsentry_hint_get_attachments,sentry_hint_remove_attachmentandsentry_hint_clear_attachmentsto allow filtering attachments without modifying scopes.Caution
BREAKING CHANGE:
before_sendcallbacks now takesentry_hint_t *instead ofvoid *for the hint parameter.sentry_scope_capture_eventnow requires a hint argument; passNULLwhen no hint is needed. Scope attachment changes inside either callback no longer affect the current event; modify the hint instead.Close: #2098