You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android: sentry-okhttp's interceptor/listener, auto-installed by the Sentry Android Gradle Plugin (autoInstallation defaults to on). RN networking runs on OkHttp, so JS requests get a native breadcrumb too.
So option 3 needs the JS marking layer plus matching "skip if marker header present" logic in both sentry-cocoa and sentry-java/sentry-okhttp. Miss one and that platform regresses to duplicates. Open questions for a spike: marking all JS requests (today header injection is gated by tracePropagationTargets and only covers traced requests); marker header leaking to customer servers (no CORS preflight in RN, so no breakage, but ugly — stripping is impractical post-swizzle); and getting RN-specific marker handling accepted into two shared SDKs.
The current heuristic's structural advantage is that it's one platform-agnostic function that dedups any native http breadcrumb regardless of source — cocoa swizzle, SAGP-injected OkHttp, a manually-added interceptor, or a future source. Option 3 only suppresses the sources whose interceptor we modify, so it's narrower in coverage unless every native HTTP path honors the marker.
Recommendation: treat this as a deliberate cost/benefit call rather than a search for a simpler trick. Keep the heuristic unless its false-positive/negative rate proves problematic in the field; pursue option 3 only as a coordinated multi-SDK effort if we decide the determinism is worth it. Worth validating the JS "mark every request" hook in a spike first, since that's the main uncertainty.
Closing as won't do for now. Per the analysis above, Option 3 is the more principled approach but requires coordinated changes across three SDKs (RN + sentry-cocoa + sentry-java) and ends up narrower in coverage than the current platform-agnostic heuristic. The determinism benefit is real but marginal, and we have no field reports of the heuristic producing wrong results. Revisit if false positives/negatives show up in practice.
Activity
linear-code commentedon May 19, 2026
RN-651
antonis commentedon Jun 17, 2026
Investigated the "better/simpler" angle. Summary of where this lands:
Recap of the options (from #3045): (1) JS-only breadcrumbs — rejected, loses native-only requests; (2) native-only — rejected, bypasses
beforeBreadcrumb; (3) mark JS requests + native interceptor drops the dup; (4) heuristic duplicate filtering — what shipped in #6132.Option 3 is the principled end-state but it's cross-SDK, not simpler. The duplication isn't iOS-only — it's produced by:
SentryNetworkTrackerswizzlingNSURLSession(always on).sentry-okhttp's interceptor/listener, auto-installed by the Sentry Android Gradle Plugin (autoInstallationdefaults to on). RN networking runs on OkHttp, so JS requests get a native breadcrumb too.So option 3 needs the JS marking layer plus matching "skip if marker header present" logic in both sentry-cocoa and sentry-java/sentry-okhttp. Miss one and that platform regresses to duplicates. Open questions for a spike: marking all JS requests (today header injection is gated by
tracePropagationTargetsand only covers traced requests); marker header leaking to customer servers (no CORS preflight in RN, so no breakage, but ugly — stripping is impractical post-swizzle); and getting RN-specific marker handling accepted into two shared SDKs.The current heuristic's structural advantage is that it's one platform-agnostic function that dedups any native
httpbreadcrumb regardless of source — cocoa swizzle, SAGP-injected OkHttp, a manually-added interceptor, or a future source. Option 3 only suppresses the sources whose interceptor we modify, so it's narrower in coverage unless every native HTTP path honors the marker.Recommendation: treat this as a deliberate cost/benefit call rather than a search for a simpler trick. Keep the heuristic unless its false-positive/negative rate proves problematic in the field; pursue option 3 only as a coordinated multi-SDK effort if we decide the determinism is worth it. Worth validating the JS "mark every request" hook in a spike first, since that's the main uncertainty.
antonis commentedon Jun 17, 2026
Closing as won't do for now. Per the analysis above, Option 3 is the more principled approach but requires coordinated changes across three SDKs (RN + sentry-cocoa + sentry-java) and ends up narrower in coverage than the current platform-agnostic heuristic. The determinism benefit is real but marginal, and we have no field reports of the heuristic producing wrong results. Revisit if false positives/negatives show up in practice.