Add an optional fingerprint to SkipSentry.capture(error:) - #7
Open
vincentborko wants to merge 1 commit into
Open
vincentborko wants to merge 1 commit into
vincentborko wants to merge 1 commit into
Conversation
When non-nil, the event gets a single-element fingerprint, so distinct
failures that share a generic bridged throwable (such as
SwiftJNI.ThrowableError) land in separate Sentry issues, and repeats of
the same failure stay in one. The default nil keeps the current behavior.
iOS: SentrySDK.capture(error:) { scope.setFingerprint([fp]) }
Android: Sentry.captureException(throwable) { scope.setFingerprint(listOf(fp)) }
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Qh5nkgtHPgaRKT7fJK1Db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skip Pull Request Checklist:
swift testMotivation
On Android, many errors reach Sentry as the same generic bridged throwable (for example
SwiftJNI.ThrowableError error 1). Sentry's default grouping then folds unrelated failures into one issue. Both native SDKs let the caller set a fingerprint per event;SkipSentry.capture(error:)had no way to pass one.Change
SkipSentry.capture(error:fingerprint:)withfingerprint: String? = nil. When non-nil the event gets[fingerprint]as its fingerprint:SentrySDK.capture(error:) { scope in scope.setFingerprint([fingerprint]) }Sentry.captureException(throwable) { scope -> scope.setFingerprint(listOf(fingerprint)) }nilkeeps the current call unchanged, so existing callers are unaffected.Testing
swift testpasses natively and transpiled (Robolectric).testSkipSentryAPICompilationnow also calls the new overload. A deliberately broken identifier in theSKIP INSERTblock fails the Kotlin compile in the same run, so the Android branch is compiled by the test.🤖 Generated with Claude Code
https://claude.ai/code/session_014Qh5nkgtHPgaRKT7fJK1Db