feat: add hint to public capture methods - #8955
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 8a15571. Configure here.
| let scope = Scope(scope: SentrySDKInternal.currentHub().scope) | ||
| block(scope) | ||
| return SentrySDKInternal.capture(event: event, scope: scope, hint: hint) | ||
| } |
There was a problem hiding this comment.
SentrySDK hint methods lack ObjC
Medium Severity
The new SentrySDK hint overloads omit the #if !SDK_V10 @objc(...) annotations that every other public capture method uses. In V9, SentrySDK is the ObjC entry point, so [SentrySDK captureEvent:withHint:] and the error, exception, and message equivalents are unavailable. SentryHub hint methods are @objc, and SentryObjCSDK only helps apps that import that separate module.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 8a15571. Configure here.
Thread user-provided SentryHint through SentrySDK -> SentryHub -> SentryClient capture methods, matching sentry-java's pattern for beforeSend callbacks.
8a15571 to
fa59ace
Compare
📲 Install BuildsiOS
|
Performance metrics 🚀
|


Summary
SentryHintthroughSentrySDK→SentryHub→SentryClientcapture methods (event, error, exception, message)hint:parameter variants to ObjC (SentryObjCSDK,SentryObjCHub) and Swift (SentrySDK,SentryHub) public APIsnilbeforeSendWithHintStacked on #8942.
Test plan
make formatpassesmake analyzepassesmake build-ios FOR_AGENTS=truepassesSentryClientTestsverify hint flows through for event, error, exception, and message capturemake generate-public-apineeds Xcode 16 (current env has Xcode 26) —sdk_api*.jsonincluded frommake formatrun