Skip to content

Native HTTP breadcrumb dedup never matches requests that have a query string #6872

Closed

Description

@tareksabry1337

Versions

@sentry/react-native 8.30.0, @sentry/core 10.76.0, sentry-cocoa 9.30.1 (bundled), React Native 0.86.3, Expo 57, iOS 27 simulator.

What happens

Every API request that has a query string shows up twice in an event's breadcrumbs: once from the JS XHR instrumentation and once from the native iOS network tracker.

deviceContextIntegration already tries to remove these duplicates (deduplicateNativeHttpBreadcrumbs in integrations/devicecontext.js). It matches a native breadcrumb to a JS one by method, status, a 2 second time window, and an exact comparison of data.url. The URL comparison never matches when there is a query string:

  • the JS breadcrumb's data.url is the full URL including ?query
  • the native breadcrumb's data.url has no query; the query is stored separately in data["http.query"]

We also saw the host casing and a trailing slash differ between the two in some cases, which defeats the exact comparison as well.

Steps to reproduce

  1. iOS app with default integrations (enableNetworkBreadcrumbs defaults to on).
  2. Make any request whose URL has a query string, e.g. GET https://api.example.com/posts?page=1.
  3. Capture an error and look at its breadcrumbs: the request appears twice, one xhr and one http breadcrumb.

What we did

We changed the URL comparison in the dedupe to compare a normalized form of both URLs: query string and fragment removed, scheme and host lowercased, trailing slash removed. After that each request appears once. Requests without a query string were already deduplicated correctly, so they are unaffected.

Activity

  1. linear-code commented on Oct 12, 2026

    @linear-code
  2. antonis commented on Oct 12, 2026

    @antonis
    Contributor

    Thank you for reporting. We will investigate this and iterate back 🙇

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Oct 12, 2026
  4. self-assigned this
    on Oct 12, 2026
  5. github-actions commented on Oct 15, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #6881, which was included in the 8.31.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions