diff --git a/generated/attributes/all.md b/generated/attributes/all.md index 42516ff1..f85453e5 100644 --- a/generated/attributes/all.md +++ b/generated/attributes/all.md @@ -4,7 +4,7 @@ This page lists all available attributes across all categories. -Total attributes: 422 +Total attributes: 424 ## Stable Attributes @@ -31,6 +31,7 @@ Total attributes: 422 | [`browser.script.invoker_type`](./browser.md#browserscriptinvoker_type) | Browser script entry point type. | | [`browser.script.source_char_position`](./browser.md#browserscriptsource_char_position) | A number representing the script character position of the script. | | [`browser.version`](./browser.md#browserversion) | The version of the browser. | +| [`browser.web_vital.cls.source.\`](./browser.md#browserweb_vitalclssourcekey) | The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N | | [`cache.hit`](./cache.md#cachehit) | If the cache was hit during this span. | | [`cache.item_size`](./cache.md#cacheitem_size) | The size of the requested item in the cache. In bytes. | | [`cache.key`](./cache.md#cachekey) | The key of the cache accessed. | @@ -379,6 +380,7 @@ Total attributes: 422 | [`ai.top_k`](./ai.md#aitop_k) | [`gen_ai.request.top_k`](./gen_ai.md#gen_airequesttop_k) | | [`ai.top_p`](./ai.md#aitop_p) | [`gen_ai.request.top_p`](./gen_ai.md#gen_airequesttop_p) | | [`ai.total_tokens.used`](./ai.md#aitotal_tokensused) | [`gen_ai.usage.total_tokens`](./gen_ai.md#gen_aiusagetotal_tokens) | +| [`cls.source.\`](./cls.md#clssourcekey) | [`browser.web_vital.cls.source.\`](./browser.md#browserweb_vitalclssourcekey) | | [`code.filepath`](./code.md#codefilepath) | [`code.file.path`](./code.md#codefilepath) | | [`code.function`](./code.md#codefunction) | [`code.function.name`](./code.md#codefunctionname) | | [`code.lineno`](./code.md#codelineno) | [`code.line.number`](./code.md#codelinenumber) | diff --git a/generated/attributes/browser.md b/generated/attributes/browser.md index 2295102b..cdf579b0 100644 --- a/generated/attributes/browser.md +++ b/generated/attributes/browser.md @@ -9,6 +9,7 @@ - [browser.script.invoker_type](#browserscriptinvoker_type) - [browser.script.source_char_position](#browserscriptsource_char_position) - [browser.version](#browserversion) + - [browser.web_vital.cls.source.\](#browserweb_vitalclssourcekey) ## Stable Attributes @@ -80,3 +81,16 @@ The version of the browser. | Example | `120.0.6099.130` | | Aliases | `sentry.browser.version` | +### browser.web_vital.cls.source.\ + +The HTML elements or components responsible for the layout shift. \ is a numeric index from 1 to N + +| Property | Value | +| --- | --- | +| Type | `string` | +| Has PII | maybe | +| Exists in OpenTelemetry | No | +| Has dynamic suffix | Yes | +| Example | `body > div#app` | +| Aliases | `cls.source.\` | + diff --git a/generated/attributes/cls.md b/generated/attributes/cls.md new file mode 100644 index 00000000..743b6497 --- /dev/null +++ b/generated/attributes/cls.md @@ -0,0 +1,26 @@ + + +# Cls Attributes + +- [Deprecated Attributes](#deprecated-attributes) + - [cls.source.\](#clssourcekey) + +## Deprecated Attributes + +These attributes are deprecated and will be removed in a future version. Please use the recommended replacements. + +### cls.source.\ + +The HTML elements or components responsible for the layout shift. \ is a numeric index from 1 to N + +| Property | Value | +| --- | --- | +| Type | `string` | +| Has PII | maybe | +| Exists in OpenTelemetry | No | +| Has dynamic suffix | Yes | +| Example | `body > div#app` | +| Deprecated | Yes, use `browser.web_vital.cls.source.\` instead | +| Deprecation Reason | The CLS source is now recorded as a browser.web_vital.cls.source.\ attribute. | +| Aliases | `browser.web_vital.cls.source.\` | + diff --git a/generated/attributes/index.md b/generated/attributes/index.md index 42ed24fd..e53ac80d 100644 --- a/generated/attributes/index.md +++ b/generated/attributes/index.md @@ -13,6 +13,7 @@ This directory contains documentation for all available attributes. - [`cache` Attributes](./cache.md) - [`client` Attributes](./client.md) - [`cloudflare` Attributes](./cloudflare.md) +- [`cls` Attributes](./cls.md) - [`code` Attributes](./code.md) - [`db` Attributes](./db.md) - [`device` Attributes](./device.md) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 7a5c8756..62adbe74 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -878,6 +878,30 @@ export const BROWSER_VERSION = 'browser.version'; */ export type BROWSER_VERSION_TYPE = string; +// Path: model/attributes/browser/browser__web_vital__cls__source__[key].json + +/** + * The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N `browser.web_vital.cls.source.` + * + * Attribute Value Type: `string` {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Has Dynamic Suffix: true + * + * Aliases: {@link CLS_SOURCE_KEY} `cls.source.` + * + * @example "body > div#app" + */ +export const BROWSER_WEB_VITAL_CLS_SOURCE_KEY = 'browser.web_vital.cls.source.'; + +/** + * Type for {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY} browser.web_vital.cls.source. + */ +export type BROWSER_WEB_VITAL_CLS_SOURCE_KEY_TYPE = string; + // Path: model/attributes/cache/cache__hit.json /** @@ -1100,6 +1124,31 @@ export const CLOUDFLARE_D1_ROWS_WRITTEN = 'cloudflare.d1.rows_written'; */ export type CLOUDFLARE_D1_ROWS_WRITTEN_TYPE = number; +// Path: model/attributes/cls/cls__source__[key].json + +/** + * The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N `cls.source.` + * + * Attribute Value Type: `string` {@link CLS_SOURCE_KEY_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Has Dynamic Suffix: true + * + * Aliases: {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY} `browser.web_vital.cls.source.` + * + * @deprecated Use {@link BROWSER_WEB_VITAL_CLS_SOURCE_KEY} (browser.web_vital.cls.source.) instead - The CLS source is now recorded as a browser.web_vital.cls.source. attribute. + * @example "body > div#app" + */ +export const CLS_SOURCE_KEY = 'cls.source.'; + +/** + * Type for {@link CLS_SOURCE_KEY} cls.source. + */ +export type CLS_SOURCE_KEY_TYPE = string; + // Path: model/attributes/code/code__filepath.json /** @@ -8849,6 +8898,7 @@ export const ATTRIBUTE_TYPE: Record = { [BROWSER_SCRIPT_INVOKER_TYPE]: 'string', [BROWSER_SCRIPT_SOURCE_CHAR_POSITION]: 'integer', [BROWSER_VERSION]: 'string', + [BROWSER_WEB_VITAL_CLS_SOURCE_KEY]: 'string', [CACHE_HIT]: 'boolean', [CACHE_ITEM_SIZE]: 'integer', [CACHE_KEY]: 'string[]', @@ -8860,6 +8910,7 @@ export const ATTRIBUTE_TYPE: Record = { [CLOUDFLARE_D1_DURATION]: 'integer', [CLOUDFLARE_D1_ROWS_READ]: 'integer', [CLOUDFLARE_D1_ROWS_WRITTEN]: 'integer', + [CLS_SOURCE_KEY]: 'string', [CODE_FILEPATH]: 'string', [CODE_FILE_PATH]: 'string', [CODE_FUNCTION]: 'string', @@ -9274,6 +9325,7 @@ export type AttributeName = | typeof BROWSER_SCRIPT_INVOKER_TYPE | typeof BROWSER_SCRIPT_SOURCE_CHAR_POSITION | typeof BROWSER_VERSION + | typeof BROWSER_WEB_VITAL_CLS_SOURCE_KEY | typeof CACHE_HIT | typeof CACHE_ITEM_SIZE | typeof CACHE_KEY @@ -9285,6 +9337,7 @@ export type AttributeName = | typeof CLOUDFLARE_D1_DURATION | typeof CLOUDFLARE_D1_ROWS_READ | typeof CLOUDFLARE_D1_ROWS_WRITTEN + | typeof CLS_SOURCE_KEY | typeof CODE_FILEPATH | typeof CODE_FILE_PATH | typeof CODE_FUNCTION @@ -10122,6 +10175,18 @@ export const ATTRIBUTE_METADATA: Record = { example: '120.0.6099.130', aliases: [SENTRY_BROWSER_VERSION], }, + [BROWSER_WEB_VITAL_CLS_SOURCE_KEY]: { + brief: 'The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + hasDynamicSuffix: true, + example: 'body > div#app', + aliases: [CLS_SOURCE_KEY], + sdks: ['javascript-browser'], + }, [CACHE_HIT]: { brief: 'If the cache was hit during this span.', type: 'boolean', @@ -10231,6 +10296,22 @@ export const ATTRIBUTE_METADATA: Record = { example: 12, sdks: ['javascript-cloudflare'], }, + [CLS_SOURCE_KEY]: { + brief: 'The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + hasDynamicSuffix: true, + example: 'body > div#app', + deprecation: { + replacement: 'browser.web_vital.cls.source.', + reason: 'The CLS source is now recorded as a browser.web_vital.cls.source. attribute.', + }, + aliases: [BROWSER_WEB_VITAL_CLS_SOURCE_KEY], + sdks: ['javascript-browser'], + }, [CODE_FILEPATH]: { brief: 'The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).', @@ -14026,6 +14107,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_SOURCE_KEY]?: BROWSER_WEB_VITAL_CLS_SOURCE_KEY_TYPE; [CACHE_HIT]?: CACHE_HIT_TYPE; [CACHE_ITEM_SIZE]?: CACHE_ITEM_SIZE_TYPE; [CACHE_KEY]?: CACHE_KEY_TYPE; @@ -14037,6 +14119,7 @@ export type Attributes = { [CLOUDFLARE_D1_DURATION]?: CLOUDFLARE_D1_DURATION_TYPE; [CLOUDFLARE_D1_ROWS_READ]?: CLOUDFLARE_D1_ROWS_READ_TYPE; [CLOUDFLARE_D1_ROWS_WRITTEN]?: CLOUDFLARE_D1_ROWS_WRITTEN_TYPE; + [CLS_SOURCE_KEY]?: CLS_SOURCE_KEY_TYPE; [CODE_FILEPATH]?: CODE_FILEPATH_TYPE; [CODE_FILE_PATH]?: CODE_FILE_PATH_TYPE; [CODE_FUNCTION]?: CODE_FUNCTION_TYPE; diff --git a/model/attributes/browser/browser__web_vital__cls__source__[key].json b/model/attributes/browser/browser__web_vital__cls__source__[key].json new file mode 100644 index 00000000..7414666b --- /dev/null +++ b/model/attributes/browser/browser__web_vital__cls__source__[key].json @@ -0,0 +1,13 @@ +{ + "key": "browser.web_vital.cls.source.", + "brief": "The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "body > div#app", + "alias": ["cls.source."], + "sdks": ["javascript-browser"], + "has_dynamic_suffix": true +} diff --git a/model/attributes/cls/cls__source__[key].json b/model/attributes/cls/cls__source__[key].json new file mode 100644 index 00000000..2a0549b6 --- /dev/null +++ b/model/attributes/cls/cls__source__[key].json @@ -0,0 +1,18 @@ +{ + "key": "cls.source.", + "brief": "The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "body > div#app", + "sdks": ["javascript-browser"], + "deprecation": { + "replacement": "browser.web_vital.cls.source.", + "reason": "The CLS source is now recorded as a browser.web_vital.cls.source. attribute.", + "_status": "backfill" + }, + "has_dynamic_suffix": true, + "alias": ["browser.web_vital.cls.source."] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index a1678932..a856e37f 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -105,6 +105,7 @@ class _AttributeNamesMeta(type): "AI_TOP_K", "AI_TOP_P", "AI_TOTAL_TOKENS_USED", + "CLS_SOURCE_KEY", "CODE_FILEPATH", "CODE_FUNCTION", "CODE_LINENO", @@ -635,6 +636,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "120.0.6099.130" """ + # Path: model/attributes/browser/browser__web_vital__cls__source__[key].json + BROWSER_WEB_VITAL_CLS_SOURCE_KEY: Literal["browser.web_vital.cls.source."] = ( + "browser.web_vital.cls.source." + ) + """The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N + + Type: str + Contains PII: maybe + Defined in OTEL: No + Has Dynamic Suffix: true + Aliases: cls.source. + Example: "body > div#app" + """ + # Path: model/attributes/cache/cache__hit.json CACHE_HIT: Literal["cache.hit"] = "cache.hit" """If the cache was hit during this span. @@ -750,6 +765,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 12 """ + # Path: model/attributes/cls/cls__source__[key].json + CLS_SOURCE_KEY: Literal["cls.source."] = "cls.source." + """The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N + + Type: str + Contains PII: maybe + Defined in OTEL: No + Has Dynamic Suffix: true + Aliases: browser.web_vital.cls.source. + DEPRECATED: Use browser.web_vital.cls.source. instead - The CLS source is now recorded as a browser.web_vital.cls.source. attribute. + Example: "body > div#app" + """ + # Path: model/attributes/code/code__file__path.json CODE_FILE_PATH: Literal["code.file.path"] = "code.file.path" """The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). @@ -5155,6 +5183,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): example="120.0.6099.130", aliases=["sentry.browser.version"], ), + "browser.web_vital.cls.source.": AttributeMetadata( + brief="The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + has_dynamic_suffix=True, + example="body > div#app", + aliases=["cls.source."], + sdks=["javascript-browser"], + ), "cache.hit": AttributeMetadata( brief="If the cache was hit during this span.", type=AttributeType.BOOLEAN, @@ -5241,6 +5279,21 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): example=12, sdks=["javascript-cloudflare"], ), + "cls.source.": AttributeMetadata( + brief="The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + has_dynamic_suffix=True, + example="body > div#app", + deprecation=DeprecationInfo( + replacement="browser.web_vital.cls.source.", + reason="The CLS source is now recorded as a browser.web_vital.cls.source. attribute.", + status=DeprecationStatus.BACKFILL, + ), + aliases=["browser.web_vital.cls.source."], + sdks=["javascript-browser"], + ), "code.file.path": AttributeMetadata( brief="The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).", type=AttributeType.STRING, @@ -8156,6 +8209,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "browser.script.invoker_type": str, "browser.script.source_char_position": int, "browser.version": str, + "browser.web_vital.cls.source.": str, "cache.hit": bool, "cache.item_size": int, "cache.key": List[str], @@ -8167,6 +8221,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "cloudflare.d1.duration": int, "cloudflare.d1.rows_read": int, "cloudflare.d1.rows_written": int, + "cls.source.": str, "code.file.path": str, "code.filepath": str, "code.function": str, diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index f02695e3..5ee0121e 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -444,6 +444,24 @@ }, "alias": ["gen_ai.usage.total_tokens"] }, + { + "key": "cls.source.", + "brief": "The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "body > div#app", + "sdks": ["javascript-browser"], + "deprecation": { + "replacement": "browser.web_vital.cls.source.", + "reason": "The CLS source is now recorded as a browser.web_vital.cls.source. attribute.", + "_status": "backfill" + }, + "has_dynamic_suffix": true, + "alias": ["browser.web_vital.cls.source."] + }, { "key": "code.filepath", "brief": "The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).",