Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,26 @@ export const BROWSER_VERSION = 'browser.version';
*/
export type BROWSER_VERSION_TYPE = string;

// Path: model/attributes/browser/browser__web_vital__cls__report_event.json
Comment thread
sentry[bot] marked this conversation as resolved.

/**
* The event that caused the SDK to report CLS (pagehide or navigation) `browser.web_vital.cls.report_event`
*
* Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_CLS_REPORT_EVENT_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* @example "navigation"
*/
export const BROWSER_WEB_VITAL_CLS_REPORT_EVENT = 'browser.web_vital.cls.report_event';

/**
* Type for {@link BROWSER_WEB_VITAL_CLS_REPORT_EVENT} browser.web_vital.cls.report_event
*/
export type BROWSER_WEB_VITAL_CLS_REPORT_EVENT_TYPE = string;
Comment thread
cursor[bot] marked this conversation as resolved.

// Path: model/attributes/browser/browser__web_vital__cls__source__[key].json

/**
Expand Down Expand Up @@ -1217,6 +1237,26 @@ export const BROWSER_WEB_VITAL_LCP_RENDER_TIME = 'browser.web_vital.lcp.render_t
*/
export type BROWSER_WEB_VITAL_LCP_RENDER_TIME_TYPE = number;

// Path: model/attributes/browser/browser__web_vital__lcp__report_event.json

/**
* The event that caused the SDK to report LCP (pagehide or navigation) `browser.web_vital.lcp.report_event`
*
* Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_LCP_REPORT_EVENT_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* @example "pagehide"
*/
export const BROWSER_WEB_VITAL_LCP_REPORT_EVENT = 'browser.web_vital.lcp.report_event';

/**
* Type for {@link BROWSER_WEB_VITAL_LCP_REPORT_EVENT} browser.web_vital.lcp.report_event
*/
export type BROWSER_WEB_VITAL_LCP_REPORT_EVENT_TYPE = string;

// Path: model/attributes/browser/browser__web_vital__lcp__size.json

/**
Expand Down Expand Up @@ -8320,6 +8360,27 @@ export const SENTRY_REPLAY_IS_BUFFERING = 'sentry.replay_is_buffering';
*/
export type SENTRY_REPLAY_IS_BUFFERING_TYPE = boolean;

// Path: model/attributes/sentry/sentry__report_event.json

/**
* (Deprecated) The event that caused the SDK to report CLS or LCP (pagehide or navigation) `sentry.report_event`
*
* Attribute Value Type: `string` {@link SENTRY_REPORT_EVENT_TYPE}
*
* Contains PII: maybe
*
* Attribute defined in OTEL: No
*
* @deprecated - The report event is now recorded as a browser.web_vital.lcp.report_event or browser.web_vital.cls.report_event attribute. No backfill required.
* @example "pagehide"
*/
export const SENTRY_REPORT_EVENT = 'sentry.report_event';

/**
* Type for {@link SENTRY_REPORT_EVENT} sentry.report_event
*/
export type SENTRY_REPORT_EVENT_TYPE = string;

// Path: model/attributes/sentry/sentry__sdk__integrations.json

/**
Expand Down Expand Up @@ -10346,6 +10407,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[BROWSER_SCRIPT_INVOKER_TYPE]: 'string',
[BROWSER_SCRIPT_SOURCE_CHAR_POSITION]: 'integer',
[BROWSER_VERSION]: 'string',
[BROWSER_WEB_VITAL_CLS_REPORT_EVENT]: 'string',
[BROWSER_WEB_VITAL_CLS_SOURCE_KEY]: 'string',
[BROWSER_WEB_VITAL_CLS_VALUE]: 'double',
[BROWSER_WEB_VITAL_FCP_VALUE]: 'double',
Expand All @@ -10355,6 +10417,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[BROWSER_WEB_VITAL_LCP_ID]: 'string',
[BROWSER_WEB_VITAL_LCP_LOAD_TIME]: 'integer',
[BROWSER_WEB_VITAL_LCP_RENDER_TIME]: 'integer',
[BROWSER_WEB_VITAL_LCP_REPORT_EVENT]: 'string',
[BROWSER_WEB_VITAL_LCP_SIZE]: 'integer',
[BROWSER_WEB_VITAL_LCP_URL]: 'string',
[BROWSER_WEB_VITAL_LCP_VALUE]: 'double',
Expand Down Expand Up @@ -10694,6 +10757,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[SENTRY_RELEASE]: 'string',
[SENTRY_REPLAY_ID]: 'string',
[SENTRY_REPLAY_IS_BUFFERING]: 'boolean',
[SENTRY_REPORT_EVENT]: 'string',
[SENTRY_SDK_INTEGRATIONS]: 'string[]',
[SENTRY_SDK_NAME]: 'string',
[SENTRY_SDK_VERSION]: 'string',
Expand Down Expand Up @@ -10838,6 +10902,7 @@ export type AttributeName =
| typeof BROWSER_SCRIPT_INVOKER_TYPE
| typeof BROWSER_SCRIPT_SOURCE_CHAR_POSITION
| typeof BROWSER_VERSION
| typeof BROWSER_WEB_VITAL_CLS_REPORT_EVENT
| typeof BROWSER_WEB_VITAL_CLS_SOURCE_KEY
| typeof BROWSER_WEB_VITAL_CLS_VALUE
| typeof BROWSER_WEB_VITAL_FCP_VALUE
Expand All @@ -10847,6 +10912,7 @@ export type AttributeName =
| typeof BROWSER_WEB_VITAL_LCP_ID
| typeof BROWSER_WEB_VITAL_LCP_LOAD_TIME
| typeof BROWSER_WEB_VITAL_LCP_RENDER_TIME
| typeof BROWSER_WEB_VITAL_LCP_REPORT_EVENT
| typeof BROWSER_WEB_VITAL_LCP_SIZE
| typeof BROWSER_WEB_VITAL_LCP_URL
| typeof BROWSER_WEB_VITAL_LCP_VALUE
Expand Down Expand Up @@ -11186,6 +11252,7 @@ export type AttributeName =
| typeof SENTRY_RELEASE
| typeof SENTRY_REPLAY_ID
| typeof SENTRY_REPLAY_IS_BUFFERING
| typeof SENTRY_REPORT_EVENT
| typeof SENTRY_SDK_INTEGRATIONS
| typeof SENTRY_SDK_NAME
| typeof SENTRY_SDK_VERSION
Expand Down Expand Up @@ -11934,6 +12001,17 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
aliases: [SENTRY_BROWSER_VERSION],
changelog: [{ version: '0.1.0', prs: [59, 127, 139] }],
},
[BROWSER_WEB_VITAL_CLS_REPORT_EVENT]: {
brief: 'The event that caused the SDK to report CLS (pagehide or navigation)',
type: 'string',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: 'navigation',
sdks: ['javascript-browser'],
changelog: [{ version: 'next', prs: [319], description: 'Added browser.web_vital.cls.report_event attribute' }],
},
[BROWSER_WEB_VITAL_CLS_SOURCE_KEY]: {
brief: 'The HTML elements or components responsible for the layout shift. <key> is a numeric index from 1 to N',
type: 'string',
Expand Down Expand Up @@ -12043,6 +12121,17 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
sdks: ['javascript-browser'],
changelog: [{ version: 'next', prs: [233] }],
},
[BROWSER_WEB_VITAL_LCP_REPORT_EVENT]: {
brief: 'The event that caused the SDK to report LCP (pagehide or navigation)',
type: 'string',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: 'pagehide',
sdks: ['javascript-browser'],
changelog: [{ version: 'next', prs: [319], description: 'Added browser.web_vital.lcp.report_event attribute' }],
},
[BROWSER_WEB_VITAL_LCP_SIZE]: {
brief: 'The size of the largest contentful paint element',
type: 'integer',
Expand Down Expand Up @@ -16203,6 +16292,21 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
example: true,
changelog: [{ version: '0.3.0', prs: [185] }],
},
[SENTRY_REPORT_EVENT]: {
brief: '(Deprecated) The event that caused the SDK to report CLS or LCP (pagehide or navigation)',
type: 'string',
pii: {
isPii: 'maybe',
},
isInOtel: false,
example: 'pagehide',
deprecation: {
reason:
'The report event is now recorded as a browser.web_vital.lcp.report_event or browser.web_vital.cls.report_event attribute. No backfill required.',
},
sdks: ['javascript-browser'],
changelog: [{ version: 'next', prs: [320], description: 'Added sentry.report_event attribute' }],
},
[SENTRY_SDK_INTEGRATIONS]: {
brief:
'A list of names identifying enabled integrations. The list shouldhave all enabled integrations, including default integrations. Defaultintegrations are included because different SDK releases may contain differentdefault integrations.',
Expand Down Expand Up @@ -17277,6 +17381,7 @@ export type Attributes = {
[BROWSER_SCRIPT_INVOKER_TYPE]?: BROWSER_SCRIPT_INVOKER_TYPE_TYPE;
[BROWSER_SCRIPT_SOURCE_CHAR_POSITION]?: BROWSER_SCRIPT_SOURCE_CHAR_POSITION_TYPE;
[BROWSER_VERSION]?: BROWSER_VERSION_TYPE;
[BROWSER_WEB_VITAL_CLS_REPORT_EVENT]?: BROWSER_WEB_VITAL_CLS_REPORT_EVENT_TYPE;
[BROWSER_WEB_VITAL_CLS_SOURCE_KEY]?: BROWSER_WEB_VITAL_CLS_SOURCE_KEY_TYPE;
[BROWSER_WEB_VITAL_CLS_VALUE]?: BROWSER_WEB_VITAL_CLS_VALUE_TYPE;
[BROWSER_WEB_VITAL_FCP_VALUE]?: BROWSER_WEB_VITAL_FCP_VALUE_TYPE;
Expand All @@ -17286,6 +17391,7 @@ export type Attributes = {
[BROWSER_WEB_VITAL_LCP_ID]?: BROWSER_WEB_VITAL_LCP_ID_TYPE;
[BROWSER_WEB_VITAL_LCP_LOAD_TIME]?: BROWSER_WEB_VITAL_LCP_LOAD_TIME_TYPE;
[BROWSER_WEB_VITAL_LCP_RENDER_TIME]?: BROWSER_WEB_VITAL_LCP_RENDER_TIME_TYPE;
[BROWSER_WEB_VITAL_LCP_REPORT_EVENT]?: BROWSER_WEB_VITAL_LCP_REPORT_EVENT_TYPE;
[BROWSER_WEB_VITAL_LCP_SIZE]?: BROWSER_WEB_VITAL_LCP_SIZE_TYPE;
[BROWSER_WEB_VITAL_LCP_URL]?: BROWSER_WEB_VITAL_LCP_URL_TYPE;
[BROWSER_WEB_VITAL_LCP_VALUE]?: BROWSER_WEB_VITAL_LCP_VALUE_TYPE;
Expand Down Expand Up @@ -17625,6 +17731,7 @@ export type Attributes = {
[SENTRY_RELEASE]?: SENTRY_RELEASE_TYPE;
[SENTRY_REPLAY_ID]?: SENTRY_REPLAY_ID_TYPE;
[SENTRY_REPLAY_IS_BUFFERING]?: SENTRY_REPLAY_IS_BUFFERING_TYPE;
[SENTRY_REPORT_EVENT]?: SENTRY_REPORT_EVENT_TYPE;
[SENTRY_SDK_INTEGRATIONS]?: SENTRY_SDK_INTEGRATIONS_TYPE;
[SENTRY_SDK_NAME]?: SENTRY_SDK_NAME_TYPE;
[SENTRY_SDK_VERSION]?: SENTRY_SDK_VERSION_TYPE;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"key": "browser.web_vital.cls.report_event",
"brief": "The event that caused the SDK to report CLS (pagehide or navigation)",
"type": "string",
"pii": {
"key": "maybe"
},
"is_in_otel": false,
"example": "navigation",
"sdks": ["javascript-browser"],
"changelog": [
{
"version": "next",
"prs": [319],
"description": "Added browser.web_vital.cls.report_event attribute"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"key": "browser.web_vital.lcp.report_event",
"brief": "The event that caused the SDK to report LCP (pagehide or navigation)",
"type": "string",
"pii": {
"key": "maybe"
},
"is_in_otel": false,
"example": "pagehide",
"sdks": ["javascript-browser"],
"changelog": [
{
"version": "next",
"prs": [319],
"description": "Added browser.web_vital.lcp.report_event attribute"
}
]
}
22 changes: 22 additions & 0 deletions model/attributes/sentry/sentry__report_event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"key": "sentry.report_event",
"brief": "(Deprecated) The event that caused the SDK to report CLS or LCP (pagehide or navigation)",
"type": "string",
"pii": {
"key": "maybe"
},
"is_in_otel": false,
"example": "pagehide",
"sdks": ["javascript-browser"],
"deprecation": {
"reason": "The report event is now recorded as a browser.web_vital.lcp.report_event or browser.web_vital.cls.report_event attribute. No backfill required.",
"_status": null
},
Comment on lines +11 to +14
Copy link
Copy Markdown
Member Author

@Lms24 Lms24 Apr 14, 2026

Choose a reason for hiding this comment

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

I documented the old attribute (currently still sent with v1 standalone web vital spans) and marked it as deprecated. Since there's no 1:1 replacement but SDKs send one of two different attributes depending on the span, I left repalcement and _status intentionally on null since I don't think we can backfill this at all. Given there's no product logic around these attributes I think that's fine but happy to do something else if reviewers have concerns.

"changelog": [
{
"version": "next",
"prs": [320],
"description": "Added sentry.report_event attribute"
}
]
}
Loading
Loading