designcourse icon indicating copy to clipboard operation
designcourse copied to clipboard

💡 Interaction to Next Paint metrics

Open wylieconlon opened this issue 1 year ago • 10 comments

The Interaction to Next Paint metric is a missing part of the Datadog web vitals tracking. Ideally, it would be tracked automatically.

Describe alternatives you've considered

This can be implemented as a custom metric using a snippet such as this:

import { onINP } from "web-vitals/attribution";

onINP(
  (metric) => {
    return datadogRum.addAction("web-vitals.onINP", {
      ...metric,
      duration: metric.value,
    });
  },
  {
    reportAllChanges: true,
  },
);

wylieconlon avatar May 10 '23 16:05 wylieconlon

Hello @wylieconlon, Thanks for the feedback. It's on our radar, but hasn't been prioritised yet. We will keep you updated.

amortemousque avatar Jul 04 '23 11:07 amortemousque

Any update here? We started getting search console warnings about this new metric. Would love to start collecting data in Datadog.

RyanMulready avatar Jul 12 '23 13:07 RyanMulready

i would also love to see this metric sooner than later. Google will use the INP metric for their SEO placements from 03/2024, but website providers will need time ahead to actually monitor this metric and fix issues this creates. (and web vitals monitoring is a major selling point of DD RUM)

per the custom metric the OP stated: as a customer, my main concern using a SaaS service is NOT building stuff myself

cy4n avatar Jul 20 '23 12:07 cy4n

We are starting to prioritize this metric over FID and would appreciate a timeline for implementation. This will be a sticky metric to fix, which is especially dependent on RUM to understand the gaps.

KempfCreative avatar Aug 01 '23 14:08 KempfCreative

Hi everyone, thanks for your feedback. This has been prioritized for implementation, targeting early Q4 for it to be available in Datadog RUM. Stay tuned for updates.

nhientrandatadog avatar Aug 01 '23 21:08 nhientrandatadog

early Q4 which year? SCNR

cy4n avatar Oct 24 '23 08:10 cy4n

Apparently, this was first implemented a couple of months ago https://github.com/DataDog/browser-sdk/pull/2355 but it was running as an "experiment". After a couple of fixes, I saw a new PR removing this experiment 5 days ago https://github.com/DataDog/browser-sdk/pull/2448 and it released the change in v5.1.0.

Is it ok to assume that from v5.1.0, we'll have INP being collected automatically on datadog?

Edit: I bumped to the last version and it worked 🎉

imteekay avatar Oct 24 '23 19:10 imteekay

Hello everyone, Yes, the core web vital Interaction To Next Paint (INP) is officially available since v5.1.0!

amortemousque avatar Oct 25 '23 09:10 amortemousque

This is great to see! I know that when we get this out and see high values, one of the first questions is going to be how to track down the source of the long interactions. Can you share any plans you have around collecting and exposing the recommended INP contextual info referenced here? https://web.dev/articles/find-slow-interactions-in-the-field#what_you_should_collect_in_the_field_and_why

ischell avatar Oct 25 '23 18:10 ischell

Hello @ischell, Yes this is something we have in mind and we are currently working on collecting the target element attributed to the Core Web Vitals, including INP.

amortemousque avatar Oct 26 '23 10:10 amortemousque

Hello everyone, We now collect the Core Web Vital selectors (including the INP selector) since the RUM browser SDK v5.4.0. It is visible in the Datadog UI image

amortemousque avatar Jun 20 '24 15:06 amortemousque