Skip to content

Commit

Permalink
change key to webVitalsInstrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrbnsn authored and pkanal committed Feb 28, 2024
1 parent cb17269 commit f008890
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions docs/web-vitals.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For fine-tuned event processing, pass in a custom callback functions for each of
```js

const sdk = new HoneycombWebSDK({
webVitals: {
webVitalsInstrumentation: {
onCLS: (clsWithAttribution) => {//custom event processor },
}
});
Expand Down Expand Up @@ -41,7 +41,7 @@ Sometimes the element selector (used by LCP, INP & CLS events) is not very human
```js
const sdk = new HoneycombWebSDK({
serviceName: 'my-app',
webVitals: {
webVitalsInstrumentation: {
elementDataAttribute: 'human-id',
},
});
Expand All @@ -68,20 +68,20 @@ By default, each metric value is namespaced under the metric name, `lcp.value` |
```js
const sdk = new HoneycombWebSDK({
serviceName: 'my-app',
webVitals: {
webVitalsInstrumentation: {
includeValueInTopLevelNamespace: true,
},
});
```
## Disable web vitals reporting
To disable collection of web vitals, set `webVitals` to false in the config
To disable collection of web vitals, set `webVitalsInstrumentation` to false in the config
```js
const sdk = new HoneycombWebSDK({
serviceName: 'my-app',
webVitals: false,
webVitalsInstrumentation: false,
});
```
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export interface HoneycombOptions extends Partial<WebSDKConfiguration> {
*/
entryPageAttributes?: false | EntryPageConfig;

webVitals?: false | WebVitalsConfig;
webVitalsInstrumentation?: false | WebVitalsConfig;
}

interface WebVitalsConfig {
Expand Down

0 comments on commit f008890

Please sign in to comment.