grafana / faro-web-sdk

The Grafana Faro Web SDK, part of the Grafana Faro project, is a highly configurable web SDK for real user monitoring (RUM) that instruments browser frontend applications to capture observability signals. Frontend telemetry can then be correlated with backend and infrastructure data for full-stack observability.
https://grafana.com/oss/faro/
Apache License 2.0
690 stars 62 forks source link

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

Closed codecapitano closed 2 months ago

codecapitano commented 2 months ago

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:

What

Links

Cloud docs, Performance Instrumentation

Checklist

codecapitano commented 2 months ago

Too ignore endpoints for all URLs but current domain.

const currentDomain = window.location.hostname;

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