Skip to content

Add an optional fingerprint to SkipSentry.capture(error:) - #7

Open
vincentborko wants to merge 1 commit into
skiptools:mainfrom
vincentborko:pr/capture-fingerprint
Open

vincentborko wants to merge 1 commit into
skiptools:mainfrom
vincentborko:pr/capture-fingerprint

Conversation

@vincentborko

@vincentborko vincentborko commented Sep 25, 2026 •

Copy link
Copy Markdown

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

  • AI was used to generate or assist with generating this PR. Claude wrote the change; I reviewed it and ran the tests below.

Motivation

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:) with fingerprint: String? = nil. When non-nil the event gets [fingerprint] as its fingerprint:

  • iOS: SentrySDK.capture(error:) { scope in scope.setFingerprint([fingerprint]) }
  • Android: Sentry.captureException(throwable) { scope -> scope.setFingerprint(listOf(fingerprint)) }

nil keeps the current call unchanged, so existing callers are unaffected.

SkipSentry.capture(error: error, fingerprint: "sync-timeout")

Testing

swift test passes natively and transpiled (Robolectric). testSkipSentryAPICompilation now also calls the new overload. A deliberately broken identifier in the SKIP INSERT block 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

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
@cla-bot cla-bot Bot added the cla-signed label Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant