Tracking deviations from the Callback Error Isolation spec (sentry-docs PR #19189), surfaced by the Linear initiative Wrap all SDK user callbacks in a try/catch.
RN already wraps user callbacks (safeFactory / safeTracesSampler in packages/core/src/js/utils/safe.ts, applied in sdk.tsx) and logs via debug.error, does not re-throw, and does not self-capture — so the error-log / no-rethrow / no-capture requirements are met. Two recovery values deviate from the spec's fallback matrix:
1. tracesSampler throw → returns 0 (forces 0% sampling)
safe.ts:50 returns 0 on failure. The spec says fall back to traces_sample_rate and MUST NOT substitute 0.0/1.0. Silently dropping all transactions on a sampler bug is exactly the substitution the spec forbids.
→ Fall back to the configured tracesSampleRate instead.
2. beforeBreadcrumb throw → keeps the original breadcrumb
safeFactory returns args[0] on failure (safe.ts:29), so a throwing beforeBreadcrumb keeps the unmodified breadcrumb. The spec says drop the breadcrumb (client report None).
→ Return null on failure for the breadcrumb case.
Not in scope / not RN-specific
beforeSend, beforeSendTransaction, beforeSendSpan, beforeSendLog, and event processors are handled by the @sentry/core pipeline (_processEvent), not by RN — including the new callback_error client-report reason. Any gap there belongs to @sentry/javascript.
profilesSampler / error_sampler don't exist in RN (only profilesSampleRate), so those rows don't apply.
initialScope, integrations, and withScope get extra RN-side isolation not in the core matrix — reasonable, left as-is.
Caveat
The spec is still candidate and in active review (PR #19189 has open proposals to narrow isolation to "recoverable" errors and to drop before_send_metric). Neither affects the two items above.
Tracking deviations from the Callback Error Isolation spec (sentry-docs PR #19189), surfaced by the Linear initiative Wrap all SDK user callbacks in a try/catch.
RN already wraps user callbacks (
safeFactory/safeTracesSamplerinpackages/core/src/js/utils/safe.ts, applied insdk.tsx) and logs viadebug.error, does not re-throw, and does not self-capture — so the error-log / no-rethrow / no-capture requirements are met. Two recovery values deviate from the spec's fallback matrix:1.
tracesSamplerthrow → returns0(forces 0% sampling)safe.ts:50returns0on failure. The spec says fall back totraces_sample_rateand MUST NOT substitute0.0/1.0. Silently dropping all transactions on a sampler bug is exactly the substitution the spec forbids.→ Fall back to the configured
tracesSampleRateinstead.2.
beforeBreadcrumbthrow → keeps the original breadcrumbsafeFactoryreturnsargs[0]on failure (safe.ts:29), so a throwingbeforeBreadcrumbkeeps the unmodified breadcrumb. The spec says drop the breadcrumb (client reportNone).→ Return
nullon failure for the breadcrumb case.Not in scope / not RN-specific
beforeSend,beforeSendTransaction,beforeSendSpan,beforeSendLog, and event processors are handled by the@sentry/corepipeline (_processEvent), not by RN — including the newcallback_errorclient-report reason. Any gap there belongs to@sentry/javascript.profilesSampler/error_samplerdon't exist in RN (onlyprofilesSampleRate), so those rows don't apply.initialScope,integrations, andwithScopeget extra RN-side isolation not in the core matrix — reasonable, left as-is.Caveat
The spec is still
candidateand in active review (PR #19189 has open proposals to narrow isolation to "recoverable" errors and to dropbefore_send_metric). Neither affects the two items above.