Skip to content

Commit

Permalink
feat(webvitals): Adds docs for enableInp option (#9412)
Browse files Browse the repository at this point in the history
* update docs for INP

* updated webvitals product content to give more clarity around score calculations for pageloads and interactions

* cleaned up webvital browser support note a little

* Add links to 7.105.0 version sdk

* Emphasize dynamic weights and browser support in perf score calculation

* update 7.105.0 to 7.104.0

* fix link

* adds enable inp option doc

* code sample

* feedback fixes
  • Loading branch information
edwardgou-sentry committed Mar 11, 2024
1 parent 687a375 commit 43f6b9d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,16 @@ The default is `true`.
This option determines whether spans for long tasks automatically get created.

The default is `true`.


### enableInp

<Note>
The `enableInp` option requires SDK [version 7.104.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0) or higher.
</Note>

This option determines whether interactions spans automaticallly get created when an [Interaction to Next Paint (INP)](/product/performance/web-vitals/web-vitals-concepts/#interaction-to-next-paint-inp) event is detected. Interactions are scored and surfaced in the [Web Vitals](/product/performance/web-vitals/) module.

The default is `false`.

<PlatformContent includePath="performance/enable-inp-example" />
2 changes: 1 addition & 1 deletion docs/product/performance/web-vitals/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Understand your application's performance score and how each web v
---

<Note>
On March 12, 2024, Google replaced [First Input Display (FID)](/product/performance/web-vitals/web-vitals-concepts/#first-input-delay-fid) with [Interaction to Next Paint (INP)](/product/performance/web-vitals/web-vitals-concepts/#interaction-to-next-paint-inp) as a Core Web Vital. To begin collecting INP measurements, make sure your Javascript SDK version is [7.104.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0) or higher and that the option `enableInp` is on. FID measurements are no longer shown in the **Web Vitals** page, but can still be accessed in [Discover](/product/discover-queries). You may see changes to your performance score during this transition.
On March 12, 2024, Google replaced [First Input Display (FID)](/product/performance/web-vitals/web-vitals-concepts/#first-input-delay-fid) with [Interaction to Next Paint (INP)](/product/performance/web-vitals/web-vitals-concepts/#interaction-to-next-paint-inp) as a Core Web Vital. To begin collecting INP measurements, make sure your Javascript SDK version is [7.104.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0) or higher and that the option [`enableInp`](/platforms/javascript/performance/instrumentation/automatic-instrumentation/#enableinp) is on. FID measurements are no longer shown in the **Web Vitals** page, but can still be accessed in [Discover](/product/discover-queries). You may see changes to your performance score during this transition.
</Note>

Web vitals are a set of metrics that measure the quality of the user experience on a web page. To learn more about these metrics, see [Web Vitals Concepts](/product/performance/web-vitals/web-vitals-concepts/).
Expand Down
4 changes: 2 additions & 2 deletions docs/product/performance/web-vitals/web-vitals-concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: "Understand the health of your application with Web Vitals by monit
[Web Vitals](https://web.dev/vitals/) are a set of metrics defined by Google to measure render time, response time, and layout shift. Each data point provides insights about the overall [performance](/product/performance/) of your application.

<Note>
On March 12, 2024, Google replaced [First Input Display (FID)](#first-input-delay-fid) with [Interaction to Next Paint (INP)](#interaction-to-next-paint-inp) as a Core Web Vital. To begin collecting INP measurements, make sure your Javascript SDK version is [7.104.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0) or higher and that the option `enableInp` is on. FID measurements are no longer shown in the **Web Vitals** page, but can still be accessed in [Discover](/product/discover-queries).
On March 12, 2024, Google replaced [First Input Display (FID)](#first-input-delay-fid) with [Interaction to Next Paint (INP)](#interaction-to-next-paint-inp) as a Core Web Vital. To begin collecting INP measurements, make sure your Javascript SDK version is [7.104.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0) or higher and that the option [`enableInp`](/platforms/javascript/performance/instrumentation/automatic-instrumentation/#enableinp) is on. FID measurements are no longer shown in the **Web Vitals** page, but can still be accessed in [Discover](/product/discover-queries).
</Note>

The in-browser Sentry SDKs collect web vitals information (where supported) and adds that information to frontend [transactions](/product/performance/transaction-summary/). These web vitals are then summarized in the [**Performance > Web Vitals** page](/product/performance/web-vitals/) to give you a quick overview of how each page is performing for your users.
Expand All @@ -25,7 +25,7 @@ Google considers Core Web Vitals to be the most important metrics for measuring
### Interaction to Next Paint (INP)

<Note>
On March 12, 2024, Interaction to Next Paint (INP) replaced First Input Display (FID) as a Core Web Vital. Prior to this, INP was an experimental metric that Sentry did not collect. To begin collecting INP measurements, make sure your Javascript SDK version is [7.104.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0) or higher and that the option `enableInp` is on.
On March 12, 2024, Interaction to Next Paint (INP) replaced First Input Display (FID) as a Core Web Vital. Prior to this, INP was an experimental metric that Sentry did not collect. To begin collecting INP measurements, make sure your Javascript SDK version is [7.104.0](https://github.com/getsentry/sentry-javascript/releases/tag/7.104.0) or higher and that the option [`enableInp`](/platforms/javascript/performance/instrumentation/automatic-instrumentation/#enableinp) is on.
</Note>

[Interaction to Next Paint (INP)](https://web.dev/articles/inp) measures the time from when a user interacts with a page (through a click, tap, or keyboard input) to when the next paint (rendering of content on the screen) occurs. INP aims to assess how quickly users see a response from the website after taking an action, which is crucial for providing a smooth and responsive user experience.
Expand Down
10 changes: 10 additions & 0 deletions platform-includes/performance/enable-inp-example/javascript.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
```javascript
Sentry.init({
// ...
integrations: [
Sentry.browserTracingIntegration({
enableInp: true,
}),
],
});
```

0 comments on commit 43f6b9d

Please sign in to comment.