Skip to content

feat(attributes): Add the INP target and interaction type attributes - #641

Open
logaretm wants to merge 3 commits into
mainfrom
awad/inp-element-and-interaction-type
Open

logaretm wants to merge 3 commits into
mainfrom
awad/inp-element-and-interaction-type

Conversation

@logaretm

@logaretm logaretm commented Sep 21, 2026

Copy link
Copy Markdown
Member

The element and interaction type INP was reported on only exist in the span's name and op, I think it's a bit of a guess-work and is subject to breakage if we decide to rename span name/ops, an explicit attributes makes the most sense here.

I propose defining browser.web_vital.inp.target and browser.web_vital.inp.interaction_type as attributes the SDK can send optionally when they are known.

The element and the kind of interaction INP was reported on only exist in
the span's name and op today. That makes them unavailable to anything
that reads attributes, and it cannot express an INP that web-vitals
reports without an interaction, which still gets a span name and a
`ui.interaction.click` op. Explicit attributes can simply be omitted then.
@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add the INP target and interaction type attributes by logaretm in #641
  • Use the web-vitals navigation types as-is for browser.navigation.type by logaretm in #640
  • Add legacy gen_ai cache token attributes (deprecated) by JPeer264 in #582

Other

  • (op) Add ui.resolve span op by Lms24 in #633
  • (replays) Define replayId as a deprecated attribute by mjq in #401

Internal Changes 🔧

Deps

  • Bump devalue from 5.8.1 to 5.9.2 by dependabot in #639
  • Bump smol-toml from 1.6.1 to 1.8.0 by dependabot in #635

🤖 This preview updates automatically when you update the PR.

The web vital attributes are named after the field of the performance
entry they come from: `lcp.element` after `LargestContentfulPaint.element`,
`cls.source` after `LayoutShift.sources`. For INP that field is
`PerformanceEventTiming.target`, which is also what web-vitals and the
product call it.
@logaretm logaretm changed the title feat(attributes): Add the INP element and interaction type attributes feat(attributes): Add the INP target and interaction type attributes Sep 21, 2026
@logaretm
logaretm marked this pull request as ready for review September 21, 2026 18:32
@logaretm
logaretm requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners September 21, 2026 18:32

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally fine with this but to think about: We have a browser.web_vital.lcp.element attribute. Does it make sense to rename this to browser.web_vital.inp.element?

Somewhat related, I'm planing on adding a ui.element.selector attribute to generically capture selectors but this likely doesn't fit here, given the target could also be a component name. Does that make sense to you?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, on second thought, "target" is probably more fitting for using it interchangeably on selectors or component names. I'll probably go with ui.element.target myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants