From e44c80346ea12132bf12b3cce6d5eed4fef28a3d Mon Sep 17 00:00:00 2001 From: Billy Date: Thu, 15 Jun 2023 15:44:15 -0700 Subject: [PATCH] docs: ResourcePlugin(ignoreEvent) callback description and example --- docs/configuration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 79563c64..88da8e1b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -141,7 +141,7 @@ telemetries: [ ## Resource | Name | Type | Default | Description | | --- | --- | --- | --- | -| ignore | Function(PerformanceResourceTiming) : boolean | `() => false` | A function which accepts a [`PerformanceResourceTiming`](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming) and returns a boolean that determines if the resource timing entry should be ignored. By default, no resources are ignored. | +| ignore | Function(event: ResourceEvent) : boolean | `() => false` | A function which accepts a ResourceEvent and returns a boolean that determines if the [resource event](https://github.com/aws-observability/aws-rum-web/blob/main/src/event-schemas/resource-event.json) should be ignored. By default, no resources are ignored. | ```javascript telemetries: [ @@ -149,8 +149,8 @@ telemetries: [ 'resource', { // example: ignore all resource events from mozilla - ignore: (entry) => { - const url = new Url(entry.name) + ignoreEvent: (event: ResourceEvent) => { + const url = new Url(event.name) return url.hostname === 'developer.mozilla.org'; } }