aws-observability / aws-rum-web

Amazon CloudWatch RUM Web Client
Apache License 2.0
114 stars 65 forks source link

feat: add resource and navigation event filtering #419

Closed williazz closed 1 year ago

williazz commented 1 year ago

Why (updated)

Users currently have no way to filter out unwanted performance events. One story is that customers are receiving a lot of noisy resource events from chrome extensions.

Changes

Users can filter resource events by supplying a ignore(entry: PerformanceEntry) to PerformanceConfig. This enables PerformanceObserver to ignore specified PerformanceResourceTiming entries, which are used to create RUM ResourceEvents.

In addition, ignore() also configures the NavigationPlugin, which uses a PerformanceObserver to create NavigationEvents. Here, customers can look for PerformanceNavigationTiming entries and ignore them if need be.

The default configuration is that only resource events with non-http URL schemas are ignored. This will ignore resource events from browser extensions, which typically follow non-http URL schemas (e.g. "chrome-extension://*").

Revisions

Revision 4:

Revision 3:

Revision 2:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

ps863 commented 1 year ago

High level comment: consider updating the description of PR accounting for these new changes in the revisions.

williazz commented 1 year ago

High level comment: consider updating the description of PR accounting for these new changes in the revisions.

updated