Skip to content

Link deep-link arrival to the resulting navigation transaction #6159

@alwx

Description

@alwx

deeplink.ts adds a deeplink breadcrumb on Linking.getInitialURL() and the 'url' event. reactnavigation.ts starts an idle navigation span on dispatch and finalizes it on state change. These two timelines are not connected.

GOAL: Correlate deep-link arrival with the navigation transaction that follows it:

  • When a deep link arrives, open a short-lived "pending deep link" marker (timestamp + URL) inside the integration.
  • The next navigation idle span started within a small window (e.g. routeChangeTimeoutMs, default 1000ms) attaches:
    • navigation.trigger = "deeplink"
    • deeplink.url (sanitized via sanitizeDeepLinkUrl, respecting sendDefaultPii)
    • deeplink.received_at (ms since the link was received, so the span captures the gap between "URL received" and "navigation dispatched")
  • On cold start: the deep link from getInitialURL() should attach to the very first idle navigation span (the one created in afterAllSetup / first state change), so users see the full "deep link → first paint" duration.
  • For the new TTID measurement, the time-to-initial-display fallback should ideally start from deep-link arrival, not from navigation dispatch, when a link triggered the navigation. Out of scope here if it complicates the native bridge, but document the gap.

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions