Skip to content

[RUM-16384] feat: add nativeIosResourceTrackingDisallowList RUM option - #1460

Open
marco-saia-datadog wants to merge 1 commit into
marco.saia/RUM-16384/ios-native-resource-tracking-paramfrom
marco.saia/RUM-16384/ios-native-resource-tracking-filters
Open

marco-saia-datadog wants to merge 1 commit into
marco.saia/RUM-16384/ios-native-resource-tracking-paramfrom
marco.saia/RUM-16384/ios-native-resource-tracking-filters

Conversation

@marco-saia-datadog

@marco-saia-datadog marco-saia-datadog commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Introduces a RUM initialization option to exclude URLs from native iOS resource tracking:

rumConfiguration: {
    nativeIosResourceTrackingDisallowList?: string[]
}

The list is passed to the iOS SDK's URLSessionTracking(disallowList:). Patterns are matched against the full URL: plain strings match exactly, and * matches any characters. Matching requests are not tracked as RUM resources, and they get no trace headers and no APM span.

Builds on #1459.

Motivation

Native iOS resource tracking can now be turned on or off (#1459), but there is still no way to filter what it tracks. The native resource event mapper is internal to the RN SDK, so customers cannot drop unwanted native resources, such as third-party SDK traffic. A mapper also couldn't stop trace header injection, which the disallow list does.

Changes

  • JS: the option is added to RumConfiguration, DatadogProviderConfiguration, the async/partial init configs, FileBasedConfiguration and datadog-configuration.schema.json. Patterns are not validated in JS; the iOS SDK drops invalid ones (e.g. "*") with a warning.
  • iOS: both parsers (JS bridge and native-init JSON) read the option and default to []. buildRumConfiguration passes it to URLSessionTracking only when native tracking is enabled. If the list is set while tracking is disabled, it is ignored and a DD.logger warning is printed (subject to verbosity).
  • Android: no changes. The option has no effect on Android, where the native SDK has no automatic HTTP instrumentation.
  • Tests: Jest covers how the option flows through every config path. The new XCTests cover both parsers, the list being applied when tracking is on, being ignored with a warning when tracking is off, and the [] default.

Compatibility

Existing apps see no behavior change unless they explicitly set the new option.

Testing

  • Jest: 847 passed, 1 skipped
  • iOS XCTests (DatadogSDKReactNative test scheme)

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING (CONTRIBUTING.md) doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@marco-saia-datadog
marco-saia-datadog changed the base branch from develop to marco.saia/RUM-16384/ios-native-resource-tracking-param October 1, 2026 11:41
@datadog-official

datadog-official Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: eec90c6 | Docs | View more details | Give us feedback!

@marco-saia-datadog
marco-saia-datadog force-pushed the marco.saia/RUM-16384/ios-native-resource-tracking-filters branch from fc0c4f7 to eec90c6 Compare October 1, 2026 13:22
@marco-saia-datadog
marco-saia-datadog marked this pull request as ready for review October 2, 2026 15:32
@marco-saia-datadog
marco-saia-datadog requested a review from a team as a code owner October 2, 2026 15:32
@marco-saia-datadog
marco-saia-datadog added this pull request to stack #1468 October 2, 2026 15:32

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant