Skip to content

Commit

Permalink
docs: ResourcePlugin(ignoreEvent) callback description and example
Browse files Browse the repository at this point in the history
  • Loading branch information
williazz committed Jun 15, 2023
1 parent 3fd4d7b commit e44c803
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@ 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: [
[
'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';
}
}
Expand Down

0 comments on commit e44c803

Please sign in to comment.