Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

553 allow to exclude requests to certain urls from tracking on a global level #554

Conversation

codecapitano
Copy link
Collaborator

@codecapitano codecapitano commented Apr 12, 2024

Why

Faro does not provide an easy to use option to globally ignore endpoints from being tracked.
This only applies to requests to endpoints, not page URLs of a website.

This helps to reduce noise and save resources (# of requests, amount of data sent) of visitors of the web site and can remove noise from RUM data.

For example tracking the load performance to common analytics libraries all the time may not provide much value.

Currently this affects the following instruments:

  • Performance
  • XHR (experimental)
  • Fetch (experimental)
  • Performance Timeline (experimental)

What

  • Provide the ignoreEndpoints property to define strings and regex patterns for URLs to be excluded
  • Fix some tests in XHR and Fetch instrumentation

Links

Cloud docs, Performance Instrumentation

Checklist

  • Tests added
  • Changelog updated
  • Documentation updated

Copy link
Collaborator

@eskirk eskirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lots of good tests, thanks for replacing the ad-hoc type with Patterns

@codecapitano codecapitano marked this pull request as draft April 18, 2024 13:10
@codecapitano codecapitano marked this pull request as ready for review April 26, 2024 08:36
@codecapitano
Copy link
Collaborator Author

Too ignore endpoints for all URLs but current domain.

const currentDomain = window.location.hostname;

ignoreUrls: [new RegExp(`^(?!.*${currentDomain})`)],

@codecapitano codecapitano force-pushed the 553-allow-to-exclude-requests-to-certain-urls-from-tracking-on-a-global-level branch from a3a4a37 to 08aba4f Compare April 26, 2024 10:03
@codecapitano codecapitano merged commit 8838704 into main Apr 26, 2024
2 checks passed
@codecapitano codecapitano deleted the 553-allow-to-exclude-requests-to-certain-urls-from-tracking-on-a-global-level branch April 26, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to exclude requests to certain urls from tracking on a global level
2 participants