Skip to content

Allow resource tracking filtration by passing in an optional array of ResourceMapper #1098

@kevindice

Description

@kevindice

Feature description

There are some resources which we would like to filter out from resource tracking. In digging into the SDK's implementation, we see that the XHRProxy is set up to filter requests via the ResourceReporter, and currently that ResourceReporter is only given a hard-coded filter for dev-related network noise.

We would like to be able to specify additional custom filters.

Proposed solution

Allow for specifying an optional parameter of type ResourceMapper which we could use to filter out these HEAD requests from a specific domain.

Other relevant information

Some more background into our specific use case:

  • we use react-native-turbo-image which handles caching and network requests in its own native code, and these requests are not picked up by DD
  • in order to report on the image sizes to DD, we perform a HTTP HEAD request to get the image size; this allows us to report the resource to DD manually
  • however, DD does pick up on the HEAD request itself which we don't want as it's noise to us

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions