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 @@
## master #2099 +/- ##
==========================================
+ Coverage 74.67% 74.84% +0.16%
==========================================
Files 103 103
Lines 27386 27395 +9
Branches 4944 4944
==========================================
+ Hits 20450 20503 +53
+ Misses 5588 5541 -47
- Partials 1348 1351 +3 🚀 New features to boost your workflow:
|
| * call `sentry_value_decref` on the provided event and return a | ||
| * `sentry_value_new_null()` instead. | ||
| * | ||
| * The hint is always provided and can be used to modify attachments on the |
There was a problem hiding this comment.
We need to document a gap: crash backends currently do not pass a hint.
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. |
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
71c5994 to
1c45f3f
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_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