From 721ee66cad5525ec0fc220e3da826ce3a40766e1 Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Mon, 21 Sep 2026 14:15:59 -0400 Subject: [PATCH 1/3] feat(attributes): Add the INP element and interaction type attributes 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. --- .../sentry-conventions/src/attributes.ts | 88 +++++++++++++++++++ javascript/sentry-conventions/src/search.ts | 25 ++++++ .../browser__web_vital__inp__element.json | 21 +++++ ...ser__web_vital__inp__interaction_type.json | 22 +++++ python/src/sentry_conventions/attributes.py | 73 +++++++++++++++ 5 files changed, 229 insertions(+) create mode 100644 model/attributes/browser/browser__web_vital__inp__element.json create mode 100644 model/attributes/browser/browser__web_vital__inp__interaction_type.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index b18e97ce..42ea4d0f 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3586,6 +3586,52 @@ export const BROWSER_WEB_VITAL_FP_VALUE = 'browser.web_vital.fp.value'; */ export type BROWSER_WEB_VITAL_FP_VALUE_TYPE = number; +// Path: model/attributes/browser/browser__web_vital__inp__element.json + +/** + * The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on `browser.web_vital.inp.element` + * + * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_INP_ELEMENT_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "body > div#app > button.submit" + * @example "SubmitButton" + */ +export const BROWSER_WEB_VITAL_INP_ELEMENT = 'browser.web_vital.inp.element'; + +/** + * Type for {@link BROWSER_WEB_VITAL_INP_ELEMENT} browser.web_vital.inp.element + */ +export type BROWSER_WEB_VITAL_INP_ELEMENT_TYPE = string; + +// Path: model/attributes/browser/browser__web_vital__inp__interaction_type.json + +/** + * The kind of user interaction INP was reported on `browser.web_vital.inp.interaction_type` + * + * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "click" + * @example "hover" + * @example "drag" + * @example "press" + */ +export const BROWSER_WEB_VITAL_INP_INTERACTION_TYPE = 'browser.web_vital.inp.interaction_type'; + +/** + * Type for {@link BROWSER_WEB_VITAL_INP_INTERACTION_TYPE} browser.web_vital.inp.interaction_type + */ +export type BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE = string; + // Path: model/attributes/browser/browser__web_vital__inp__value.json /** @@ -19530,6 +19576,8 @@ export const ATTRIBUTE_TYPE: Record = { 'browser.web_vital.cls.value': 'double', 'browser.web_vital.fcp.value': 'double', 'browser.web_vital.fp.value': 'double', + 'browser.web_vital.inp.element': 'string', + 'browser.web_vital.inp.interaction_type': 'string', 'browser.web_vital.inp.value': 'double', 'browser.web_vital.lcp.element': 'string', 'browser.web_vital.lcp.id': 'string', @@ -20395,6 +20443,8 @@ export type AttributeName = | typeof BROWSER_WEB_VITAL_CLS_VALUE | typeof BROWSER_WEB_VITAL_FCP_VALUE | typeof BROWSER_WEB_VITAL_FP_VALUE + | typeof BROWSER_WEB_VITAL_INP_ELEMENT + | typeof BROWSER_WEB_VITAL_INP_INTERACTION_TYPE | typeof BROWSER_WEB_VITAL_INP_VALUE | typeof BROWSER_WEB_VITAL_LCP_ELEMENT | typeof BROWSER_WEB_VITAL_LCP_ID @@ -23664,6 +23714,42 @@ export const ATTRIBUTE_METADATA: Record = { aliases: ['fp'], changelog: [{ version: '0.5.0', prs: [235] }], }, + 'browser.web_vital.inp.element': { + brief: + 'The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on', + type: 'string', + keys: ['browser.web_vital.inp.element'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'body > div#app > button.submit', + examples: ['body > div#app > button.submit', 'SubmitButton'], + changelog: [{ version: 'next', description: 'Added browser.web_vital.inp.element attribute' }], + additionalContext: [ + 'Uses the same format as `browser.web_vital.lcp.element`.', + 'Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`.', + ], + }, + 'browser.web_vital.inp.interaction_type': { + brief: 'The kind of user interaction INP was reported on', + type: 'string', + keys: ['browser.web_vital.inp.interaction_type'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'click', + examples: ['click', 'hover', 'drag', 'press'], + changelog: [{ version: 'next', description: 'Added browser.web_vital.inp.interaction_type attribute' }], + additionalContext: [ + "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", + 'Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.', + 'Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.element`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction.', + ], + }, 'browser.web_vital.inp.value': { brief: 'The value of the recorded Interaction to Next Paint (INP) web vital', type: 'double', @@ -35091,6 +35177,8 @@ export type Attributes = { [BROWSER_WEB_VITAL_CLS_VALUE]?: BROWSER_WEB_VITAL_CLS_VALUE_TYPE; [BROWSER_WEB_VITAL_FCP_VALUE]?: BROWSER_WEB_VITAL_FCP_VALUE_TYPE; [BROWSER_WEB_VITAL_FP_VALUE]?: BROWSER_WEB_VITAL_FP_VALUE_TYPE; + [BROWSER_WEB_VITAL_INP_ELEMENT]?: BROWSER_WEB_VITAL_INP_ELEMENT_TYPE; + [BROWSER_WEB_VITAL_INP_INTERACTION_TYPE]?: BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE; [BROWSER_WEB_VITAL_INP_VALUE]?: BROWSER_WEB_VITAL_INP_VALUE_TYPE; [BROWSER_WEB_VITAL_LCP_ELEMENT]?: BROWSER_WEB_VITAL_LCP_ELEMENT_TYPE; [BROWSER_WEB_VITAL_LCP_ID]?: BROWSER_WEB_VITAL_LCP_ID_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 05c74fd8..42c62f4c 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -947,6 +947,16 @@ export const SEARCH_BROWSER__WEB_VITAL__FCP__VALUE = 'browser.web_vital.fcp.valu */ export const SEARCH_BROWSER__WEB_VITAL__FP__VALUE = 'browser.web_vital.fp.value'; +/** + * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_ELEMENT}. `browser.web_vital.inp.element` + */ +export const SEARCH_BROWSER__WEB_VITAL__INP__ELEMENT = 'browser.web_vital.inp.element'; + +/** + * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_INTERACTION_TYPE}. `browser.web_vital.inp.interaction_type` + */ +export const SEARCH_BROWSER__WEB_VITAL__INP__INTERACTION_TYPE = 'browser.web_vital.inp.interaction_type'; + /** * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_VALUE}. `browser.web_vital.inp.value` */ @@ -5144,6 +5154,8 @@ export type AttributeSearchName = | typeof SEARCH_BROWSER__WEB_VITAL__CLS__VALUE | typeof SEARCH_BROWSER__WEB_VITAL__FCP__VALUE | typeof SEARCH_BROWSER__WEB_VITAL__FP__VALUE + | typeof SEARCH_BROWSER__WEB_VITAL__INP__ELEMENT + | typeof SEARCH_BROWSER__WEB_VITAL__INP__INTERACTION_TYPE | typeof SEARCH_BROWSER__WEB_VITAL__INP__VALUE | typeof SEARCH_BROWSER__WEB_VITAL__LCP__ELEMENT | typeof SEARCH_BROWSER__WEB_VITAL__LCP__ID @@ -6908,6 +6920,19 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The time in milliseconds it takes for the browser to render the first pixel on the screen', deprecationChain: ['browser.web_vital.fp.value', 'fp'], }, + 'browser.web_vital.inp.element': { + canonicalName: 'browser.web_vital.inp.element', + type: 'string', + brief: + 'The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on', + deprecationChain: ['browser.web_vital.inp.element'], + }, + 'browser.web_vital.inp.interaction_type': { + canonicalName: 'browser.web_vital.inp.interaction_type', + type: 'string', + brief: 'The kind of user interaction INP was reported on', + deprecationChain: ['browser.web_vital.inp.interaction_type'], + }, 'browser.web_vital.inp.value': { canonicalName: 'browser.web_vital.inp.value', type: 'double', diff --git a/model/attributes/browser/browser__web_vital__inp__element.json b/model/attributes/browser/browser__web_vital__inp__element.json new file mode 100644 index 00000000..d368d372 --- /dev/null +++ b/model/attributes/browser/browser__web_vital__inp__element.json @@ -0,0 +1,21 @@ +{ + "key": "browser.web_vital.inp.element", + "brief": "The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["body > div#app > button.submit", "SubmitButton"], + "additional_context": [ + "Uses the same format as `browser.web_vital.lcp.element`.", + "Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`." + ], + "changelog": [ + { + "version": "next", + "description": "Added browser.web_vital.inp.element attribute" + } + ] +} diff --git a/model/attributes/browser/browser__web_vital__inp__interaction_type.json b/model/attributes/browser/browser__web_vital__inp__interaction_type.json new file mode 100644 index 00000000..05afd41b --- /dev/null +++ b/model/attributes/browser/browser__web_vital__inp__interaction_type.json @@ -0,0 +1,22 @@ +{ + "key": "browser.web_vital.inp.interaction_type", + "brief": "The kind of user interaction INP was reported on", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["click", "hover", "drag", "press"], + "additional_context": [ + "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", + "Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.", + "Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.element`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction." + ], + "changelog": [ + { + "version": "next", + "description": "Added browser.web_vital.inp.interaction_type attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 3122bf6c..a37a5194 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -2467,6 +2467,36 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 477.1926 """ + # Path: model/attributes/browser/browser__web_vital__inp__element.json + BROWSER_WEB_VITAL_INP_ELEMENT: Literal["browser.web_vital.inp.element"] = ( + "browser.web_vital.inp.element" + ) + """The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "body > div#app > button.submit" + Example: "SubmitButton" + """ + + # Path: model/attributes/browser/browser__web_vital__inp__interaction_type.json + BROWSER_WEB_VITAL_INP_INTERACTION_TYPE: Literal[ + "browser.web_vital.inp.interaction_type" + ] = "browser.web_vital.inp.interaction_type" + """The kind of user interaction INP was reported on + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "click" + Example: "hover" + Example: "drag" + Example: "press" + """ + # Path: model/attributes/browser/browser__web_vital__inp__value.json BROWSER_WEB_VITAL_INP_VALUE: Literal["browser.web_vital.inp.value"] = ( "browser.web_vital.inp.value" @@ -14394,6 +14424,47 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.5.0", prs=[235]), ], ), + "browser.web_vital.inp.element": AttributeMetadata( + brief="The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on", + type=AttributeType.STRING, + keys=("browser.web_vital.inp.element",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="body > div#app > button.submit", + examples=["body > div#app > button.submit", "SubmitButton"], + changelog=[ + ChangelogEntry( + version="next", + description="Added browser.web_vital.inp.element attribute", + ), + ], + additional_context=[ + "Uses the same format as `browser.web_vital.lcp.element`.", + "Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`.", + ], + ), + "browser.web_vital.inp.interaction_type": AttributeMetadata( + brief="The kind of user interaction INP was reported on", + type=AttributeType.STRING, + keys=("browser.web_vital.inp.interaction_type",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="click", + examples=["click", "hover", "drag", "press"], + changelog=[ + ChangelogEntry( + version="next", + description="Added browser.web_vital.inp.interaction_type attribute", + ), + ], + additional_context=[ + "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", + "Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.", + "Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.element`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction.", + ], + ), "browser.web_vital.inp.value": AttributeMetadata( brief="The value of the recorded Interaction to Next Paint (INP) web vital", type=AttributeType.DOUBLE, @@ -27540,6 +27611,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "browser.web_vital.cls.value": float, "browser.web_vital.fcp.value": float, "browser.web_vital.fp.value": float, + "browser.web_vital.inp.element": str, + "browser.web_vital.inp.interaction_type": str, "browser.web_vital.inp.value": float, "browser.web_vital.lcp.element": str, "browser.web_vital.lcp.id": str, From 94d455f1f8b1cb9641875215b64051664ee409f2 Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Mon, 21 Sep 2026 14:17:02 -0400 Subject: [PATCH 2/3] chore: Reference the PR in the changelog entry --- javascript/sentry-conventions/src/attributes.ts | 4 ++-- .../attributes/browser/browser__web_vital__inp__element.json | 1 + .../browser/browser__web_vital__inp__interaction_type.json | 1 + python/src/sentry_conventions/attributes.py | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 42ea4d0f..465f65f2 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -23726,7 +23726,7 @@ export const ATTRIBUTE_METADATA: Record = { visibility: 'public', example: 'body > div#app > button.submit', examples: ['body > div#app > button.submit', 'SubmitButton'], - changelog: [{ version: 'next', description: 'Added browser.web_vital.inp.element attribute' }], + changelog: [{ version: 'next', prs: [641], description: 'Added browser.web_vital.inp.element attribute' }], additionalContext: [ 'Uses the same format as `browser.web_vital.lcp.element`.', 'Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`.', @@ -23743,7 +23743,7 @@ export const ATTRIBUTE_METADATA: Record = { visibility: 'public', example: 'click', examples: ['click', 'hover', 'drag', 'press'], - changelog: [{ version: 'next', description: 'Added browser.web_vital.inp.interaction_type attribute' }], + changelog: [{ version: 'next', prs: [641], description: 'Added browser.web_vital.inp.interaction_type attribute' }], additionalContext: [ "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", 'Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.', diff --git a/model/attributes/browser/browser__web_vital__inp__element.json b/model/attributes/browser/browser__web_vital__inp__element.json index d368d372..b78e363c 100644 --- a/model/attributes/browser/browser__web_vital__inp__element.json +++ b/model/attributes/browser/browser__web_vital__inp__element.json @@ -15,6 +15,7 @@ "changelog": [ { "version": "next", + "prs": [641], "description": "Added browser.web_vital.inp.element attribute" } ] diff --git a/model/attributes/browser/browser__web_vital__inp__interaction_type.json b/model/attributes/browser/browser__web_vital__inp__interaction_type.json index 05afd41b..89391880 100644 --- a/model/attributes/browser/browser__web_vital__inp__interaction_type.json +++ b/model/attributes/browser/browser__web_vital__inp__interaction_type.json @@ -16,6 +16,7 @@ "changelog": [ { "version": "next", + "prs": [641], "description": "Added browser.web_vital.inp.interaction_type attribute" } ] diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index a37a5194..490ca580 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -14436,6 +14436,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): changelog=[ ChangelogEntry( version="next", + prs=[641], description="Added browser.web_vital.inp.element attribute", ), ], @@ -14456,6 +14457,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): changelog=[ ChangelogEntry( version="next", + prs=[641], description="Added browser.web_vital.inp.interaction_type attribute", ), ], From 33c34d16ca86989cbc9eb498818f8b0132c280b2 Mon Sep 17 00:00:00 2001 From: Abdelrahman Awad Date: Mon, 21 Sep 2026 14:20:56 -0400 Subject: [PATCH 3/3] ref(attributes): Name the INP element after the Event Timing target 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. --- .../sentry-conventions/src/attributes.ts | 78 +++++++++---------- javascript/sentry-conventions/src/search.ts | 24 +++--- ...ser__web_vital__inp__interaction_type.json | 2 +- ...n => browser__web_vital__inp__target.json} | 6 +- python/src/sentry_conventions/attributes.py | 64 +++++++-------- 5 files changed, 87 insertions(+), 87 deletions(-) rename model/attributes/browser/{browser__web_vital__inp__element.json => browser__web_vital__inp__target.json} (71%) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 465f65f2..309c535e 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3586,51 +3586,51 @@ export const BROWSER_WEB_VITAL_FP_VALUE = 'browser.web_vital.fp.value'; */ export type BROWSER_WEB_VITAL_FP_VALUE_TYPE = number; -// Path: model/attributes/browser/browser__web_vital__inp__element.json +// Path: model/attributes/browser/browser__web_vital__inp__interaction_type.json /** - * The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on `browser.web_vital.inp.element` + * The kind of user interaction INP was reported on `browser.web_vital.inp.interaction_type` * - * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_INP_ELEMENT_TYPE} + * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE} * * Apply Scrubbing: manual * * Attribute defined in OTEL: No * Visibility: public * - * @example "body > div#app > button.submit" - * @example "SubmitButton" + * @example "click" + * @example "hover" + * @example "drag" + * @example "press" */ -export const BROWSER_WEB_VITAL_INP_ELEMENT = 'browser.web_vital.inp.element'; +export const BROWSER_WEB_VITAL_INP_INTERACTION_TYPE = 'browser.web_vital.inp.interaction_type'; /** - * Type for {@link BROWSER_WEB_VITAL_INP_ELEMENT} browser.web_vital.inp.element + * Type for {@link BROWSER_WEB_VITAL_INP_INTERACTION_TYPE} browser.web_vital.inp.interaction_type */ -export type BROWSER_WEB_VITAL_INP_ELEMENT_TYPE = string; +export type BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE = string; -// Path: model/attributes/browser/browser__web_vital__inp__interaction_type.json +// Path: model/attributes/browser/browser__web_vital__inp__target.json /** - * The kind of user interaction INP was reported on `browser.web_vital.inp.interaction_type` + * The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on `browser.web_vital.inp.target` * - * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE} + * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_INP_TARGET_TYPE} * * Apply Scrubbing: manual * * Attribute defined in OTEL: No * Visibility: public * - * @example "click" - * @example "hover" - * @example "drag" - * @example "press" + * @example "body > div#app > button.submit" + * @example "SubmitButton" */ -export const BROWSER_WEB_VITAL_INP_INTERACTION_TYPE = 'browser.web_vital.inp.interaction_type'; +export const BROWSER_WEB_VITAL_INP_TARGET = 'browser.web_vital.inp.target'; /** - * Type for {@link BROWSER_WEB_VITAL_INP_INTERACTION_TYPE} browser.web_vital.inp.interaction_type + * Type for {@link BROWSER_WEB_VITAL_INP_TARGET} browser.web_vital.inp.target */ -export type BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE = string; +export type BROWSER_WEB_VITAL_INP_TARGET_TYPE = string; // Path: model/attributes/browser/browser__web_vital__inp__value.json @@ -19576,8 +19576,8 @@ export const ATTRIBUTE_TYPE: Record = { 'browser.web_vital.cls.value': 'double', 'browser.web_vital.fcp.value': 'double', 'browser.web_vital.fp.value': 'double', - 'browser.web_vital.inp.element': 'string', 'browser.web_vital.inp.interaction_type': 'string', + 'browser.web_vital.inp.target': 'string', 'browser.web_vital.inp.value': 'double', 'browser.web_vital.lcp.element': 'string', 'browser.web_vital.lcp.id': 'string', @@ -20443,8 +20443,8 @@ export type AttributeName = | typeof BROWSER_WEB_VITAL_CLS_VALUE | typeof BROWSER_WEB_VITAL_FCP_VALUE | typeof BROWSER_WEB_VITAL_FP_VALUE - | typeof BROWSER_WEB_VITAL_INP_ELEMENT | typeof BROWSER_WEB_VITAL_INP_INTERACTION_TYPE + | typeof BROWSER_WEB_VITAL_INP_TARGET | typeof BROWSER_WEB_VITAL_INP_VALUE | typeof BROWSER_WEB_VITAL_LCP_ELEMENT | typeof BROWSER_WEB_VITAL_LCP_ID @@ -23714,40 +23714,40 @@ export const ATTRIBUTE_METADATA: Record = { aliases: ['fp'], changelog: [{ version: '0.5.0', prs: [235] }], }, - 'browser.web_vital.inp.element': { - brief: - 'The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on', + 'browser.web_vital.inp.interaction_type': { + brief: 'The kind of user interaction INP was reported on', type: 'string', - keys: ['browser.web_vital.inp.element'], + keys: ['browser.web_vital.inp.interaction_type'], applyScrubbing: { key: 'manual', }, isInOtel: false, visibility: 'public', - example: 'body > div#app > button.submit', - examples: ['body > div#app > button.submit', 'SubmitButton'], - changelog: [{ version: 'next', prs: [641], description: 'Added browser.web_vital.inp.element attribute' }], + example: 'click', + examples: ['click', 'hover', 'drag', 'press'], + changelog: [{ version: 'next', prs: [641], description: 'Added browser.web_vital.inp.interaction_type attribute' }], additionalContext: [ - 'Uses the same format as `browser.web_vital.lcp.element`.', - 'Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`.', + "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", + 'Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.', + 'Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.target`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction.', ], }, - 'browser.web_vital.inp.interaction_type': { - brief: 'The kind of user interaction INP was reported on', + 'browser.web_vital.inp.target': { + brief: + 'The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on', type: 'string', - keys: ['browser.web_vital.inp.interaction_type'], + keys: ['browser.web_vital.inp.target'], applyScrubbing: { key: 'manual', }, isInOtel: false, visibility: 'public', - example: 'click', - examples: ['click', 'hover', 'drag', 'press'], - changelog: [{ version: 'next', prs: [641], description: 'Added browser.web_vital.inp.interaction_type attribute' }], + example: 'body > div#app > button.submit', + examples: ['body > div#app > button.submit', 'SubmitButton'], + changelog: [{ version: 'next', prs: [641], description: 'Added browser.web_vital.inp.target attribute' }], additionalContext: [ - "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", - 'Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.', - 'Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.element`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction.', + 'Named after `PerformanceEventTiming.target`, the way `browser.web_vital.lcp.element` is named after `LargestContentfulPaint.element`. The value uses the same format as that attribute.', + 'Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`.', ], }, 'browser.web_vital.inp.value': { @@ -35177,8 +35177,8 @@ export type Attributes = { [BROWSER_WEB_VITAL_CLS_VALUE]?: BROWSER_WEB_VITAL_CLS_VALUE_TYPE; [BROWSER_WEB_VITAL_FCP_VALUE]?: BROWSER_WEB_VITAL_FCP_VALUE_TYPE; [BROWSER_WEB_VITAL_FP_VALUE]?: BROWSER_WEB_VITAL_FP_VALUE_TYPE; - [BROWSER_WEB_VITAL_INP_ELEMENT]?: BROWSER_WEB_VITAL_INP_ELEMENT_TYPE; [BROWSER_WEB_VITAL_INP_INTERACTION_TYPE]?: BROWSER_WEB_VITAL_INP_INTERACTION_TYPE_TYPE; + [BROWSER_WEB_VITAL_INP_TARGET]?: BROWSER_WEB_VITAL_INP_TARGET_TYPE; [BROWSER_WEB_VITAL_INP_VALUE]?: BROWSER_WEB_VITAL_INP_VALUE_TYPE; [BROWSER_WEB_VITAL_LCP_ELEMENT]?: BROWSER_WEB_VITAL_LCP_ELEMENT_TYPE; [BROWSER_WEB_VITAL_LCP_ID]?: BROWSER_WEB_VITAL_LCP_ID_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 42c62f4c..023b7a3f 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -948,14 +948,14 @@ export const SEARCH_BROWSER__WEB_VITAL__FCP__VALUE = 'browser.web_vital.fcp.valu export const SEARCH_BROWSER__WEB_VITAL__FP__VALUE = 'browser.web_vital.fp.value'; /** - * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_ELEMENT}. `browser.web_vital.inp.element` + * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_INTERACTION_TYPE}. `browser.web_vital.inp.interaction_type` */ -export const SEARCH_BROWSER__WEB_VITAL__INP__ELEMENT = 'browser.web_vital.inp.element'; +export const SEARCH_BROWSER__WEB_VITAL__INP__INTERACTION_TYPE = 'browser.web_vital.inp.interaction_type'; /** - * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_INTERACTION_TYPE}. `browser.web_vital.inp.interaction_type` + * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_TARGET}. `browser.web_vital.inp.target` */ -export const SEARCH_BROWSER__WEB_VITAL__INP__INTERACTION_TYPE = 'browser.web_vital.inp.interaction_type'; +export const SEARCH_BROWSER__WEB_VITAL__INP__TARGET = 'browser.web_vital.inp.target'; /** * Search name for {@link attributes.BROWSER_WEB_VITAL_INP_VALUE}. `browser.web_vital.inp.value` @@ -5154,8 +5154,8 @@ export type AttributeSearchName = | typeof SEARCH_BROWSER__WEB_VITAL__CLS__VALUE | typeof SEARCH_BROWSER__WEB_VITAL__FCP__VALUE | typeof SEARCH_BROWSER__WEB_VITAL__FP__VALUE - | typeof SEARCH_BROWSER__WEB_VITAL__INP__ELEMENT | typeof SEARCH_BROWSER__WEB_VITAL__INP__INTERACTION_TYPE + | typeof SEARCH_BROWSER__WEB_VITAL__INP__TARGET | typeof SEARCH_BROWSER__WEB_VITAL__INP__VALUE | typeof SEARCH_BROWSER__WEB_VITAL__LCP__ELEMENT | typeof SEARCH_BROWSER__WEB_VITAL__LCP__ID @@ -6920,19 +6920,19 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The time in milliseconds it takes for the browser to render the first pixel on the screen', deprecationChain: ['browser.web_vital.fp.value', 'fp'], }, - 'browser.web_vital.inp.element': { - canonicalName: 'browser.web_vital.inp.element', - type: 'string', - brief: - 'The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on', - deprecationChain: ['browser.web_vital.inp.element'], - }, 'browser.web_vital.inp.interaction_type': { canonicalName: 'browser.web_vital.inp.interaction_type', type: 'string', brief: 'The kind of user interaction INP was reported on', deprecationChain: ['browser.web_vital.inp.interaction_type'], }, + 'browser.web_vital.inp.target': { + canonicalName: 'browser.web_vital.inp.target', + type: 'string', + brief: + 'The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on', + deprecationChain: ['browser.web_vital.inp.target'], + }, 'browser.web_vital.inp.value': { canonicalName: 'browser.web_vital.inp.value', type: 'double', diff --git a/model/attributes/browser/browser__web_vital__inp__interaction_type.json b/model/attributes/browser/browser__web_vital__inp__interaction_type.json index 89391880..642b8a19 100644 --- a/model/attributes/browser/browser__web_vital__inp__interaction_type.json +++ b/model/attributes/browser/browser__web_vital__inp__interaction_type.json @@ -11,7 +11,7 @@ "additional_context": [ "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", "Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.", - "Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.element`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction." + "Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.target`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction." ], "changelog": [ { diff --git a/model/attributes/browser/browser__web_vital__inp__element.json b/model/attributes/browser/browser__web_vital__inp__target.json similarity index 71% rename from model/attributes/browser/browser__web_vital__inp__element.json rename to model/attributes/browser/browser__web_vital__inp__target.json index b78e363c..62ef9e61 100644 --- a/model/attributes/browser/browser__web_vital__inp__element.json +++ b/model/attributes/browser/browser__web_vital__inp__target.json @@ -1,5 +1,5 @@ { - "key": "browser.web_vital.inp.element", + "key": "browser.web_vital.inp.target", "brief": "The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on", "type": "string", "apply_scrubbing": { @@ -9,14 +9,14 @@ "visibility": "public", "examples": ["body > div#app > button.submit", "SubmitButton"], "additional_context": [ - "Uses the same format as `browser.web_vital.lcp.element`.", + "Named after `PerformanceEventTiming.target`, the way `browser.web_vital.lcp.element` is named after `LargestContentfulPaint.element`. The value uses the same format as that attribute.", "Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`." ], "changelog": [ { "version": "next", "prs": [641], - "description": "Added browser.web_vital.inp.element attribute" + "description": "Added browser.web_vital.inp.target attribute" } ] } diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 490ca580..b382f2fe 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -2467,20 +2467,6 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 477.1926 """ - # Path: model/attributes/browser/browser__web_vital__inp__element.json - BROWSER_WEB_VITAL_INP_ELEMENT: Literal["browser.web_vital.inp.element"] = ( - "browser.web_vital.inp.element" - ) - """The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on - - Type: str - Apply Scrubbing: manual - Defined in OTEL: No - Visibility: public - Example: "body > div#app > button.submit" - Example: "SubmitButton" - """ - # Path: model/attributes/browser/browser__web_vital__inp__interaction_type.json BROWSER_WEB_VITAL_INP_INTERACTION_TYPE: Literal[ "browser.web_vital.inp.interaction_type" @@ -2497,6 +2483,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "press" """ + # Path: model/attributes/browser/browser__web_vital__inp__target.json + BROWSER_WEB_VITAL_INP_TARGET: Literal["browser.web_vital.inp.target"] = ( + "browser.web_vital.inp.target" + ) + """The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "body > div#app > button.submit" + Example: "SubmitButton" + """ + # Path: model/attributes/browser/browser__web_vital__inp__value.json BROWSER_WEB_VITAL_INP_VALUE: Literal["browser.web_vital.inp.value"] = ( "browser.web_vital.inp.value" @@ -14424,47 +14424,47 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.5.0", prs=[235]), ], ), - "browser.web_vital.inp.element": AttributeMetadata( - brief="The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on", + "browser.web_vital.inp.interaction_type": AttributeMetadata( + brief="The kind of user interaction INP was reported on", type=AttributeType.STRING, - keys=("browser.web_vital.inp.element",), + keys=("browser.web_vital.inp.interaction_type",), apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), is_in_otel=False, visibility=Visibility.PUBLIC, - example="body > div#app > button.submit", - examples=["body > div#app > button.submit", "SubmitButton"], + example="click", + examples=["click", "hover", "drag", "press"], changelog=[ ChangelogEntry( version="next", prs=[641], - description="Added browser.web_vital.inp.element attribute", + description="Added browser.web_vital.inp.interaction_type attribute", ), ], additional_context=[ - "Uses the same format as `browser.web_vital.lcp.element`.", - "Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`.", + "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", + "Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.", + "Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.target`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction.", ], ), - "browser.web_vital.inp.interaction_type": AttributeMetadata( - brief="The kind of user interaction INP was reported on", + "browser.web_vital.inp.target": AttributeMetadata( + brief="The HTML element selector or component name of the element the user interacted with, for the interaction INP was reported on", type=AttributeType.STRING, - keys=("browser.web_vital.inp.interaction_type",), + keys=("browser.web_vital.inp.target",), apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), is_in_otel=False, visibility=Visibility.PUBLIC, - example="click", - examples=["click", "hover", "drag", "press"], + example="body > div#app > button.submit", + examples=["body > div#app > button.submit", "SubmitButton"], changelog=[ ChangelogEntry( version="next", prs=[641], - description="Added browser.web_vital.inp.interaction_type attribute", + description="Added browser.web_vital.inp.target attribute", ), ], additional_context=[ - "One of `click`, `hover`, `drag` or `press`, derived from the DOM event name of the Event Timing entry: pointer, mouse and touch events map to `click`, `mouseover` and similar to `hover`, drag and drop events to `drag`, and keyboard and `input` events to `press`. The same value forms the suffix of the span's `ui.interaction.*` op.", - "Not to be confused with the `interactionType` of the web-vitals attribution build, which only distinguishes `pointer` and `keyboard`.", - "Omitted when INP is reported without an interaction to attribute it to, see `browser.web_vital.inp.element`. The op of such a span still falls into `ui.interaction.click` so that it stays within the interaction span family, which makes this attribute, not the op, the way to tell a real click from a value with no interaction.", + "Named after `PerformanceEventTiming.target`, the way `browser.web_vital.lcp.element` is named after `LargestContentfulPaint.element`. The value uses the same format as that attribute.", + "Omitted when INP is reported without an interaction to attribute it to. web-vitals reports such a value for a soft navigation whose interactions all stayed below the Event Timing duration threshold, so there is no element to name. The span is still named and still carries `browser.web_vital.inp.value`.", ], ), "browser.web_vital.inp.value": AttributeMetadata( @@ -27613,8 +27613,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "browser.web_vital.cls.value": float, "browser.web_vital.fcp.value": float, "browser.web_vital.fp.value": float, - "browser.web_vital.inp.element": str, "browser.web_vital.inp.interaction_type": str, + "browser.web_vital.inp.target": str, "browser.web_vital.inp.value": float, "browser.web_vital.lcp.element": str, "browser.web_vital.lcp.id": str,