From ad3a0ba645be9373960c78975a2dd1c65e0b5f11 Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Mon, 30 Mar 2026 14:24:18 +0200 Subject: [PATCH 1/4] feat(attributes): Add deprecated app.app_* attributes with backfill to canonical app.* names Instead of renaming app.build to app.app_build, keep app.build as canonical and add app.app_build as a deprecated attribute with backfill status that aliases to app.build. Same pattern for app_identifier, app_name, app_start_time, and app_version. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../sentry-conventions/src/attributes.ts | 241 ++++++++++++++++++ model/attributes/app/app__app_build.json | 24 ++ model/attributes/app/app__app_identifier.json | 24 ++ model/attributes/app/app__app_name.json | 24 ++ model/attributes/app/app__app_start_time.json | 24 ++ model/attributes/app/app__app_version.json | 24 ++ model/attributes/app/app__build.json | 1 + model/attributes/app/app__identifier.json | 1 + model/attributes/app/app__name.json | 1 + model/attributes/app/app__start_time.json | 1 + model/attributes/app/app__version.json | 1 + python/src/sentry_conventions/attributes.py | 210 +++++++++++++++ shared/deprecated_attributes.json | 120 +++++++++ 13 files changed, 696 insertions(+) create mode 100644 model/attributes/app/app__app_build.json create mode 100644 model/attributes/app/app__app_identifier.json create mode 100644 model/attributes/app/app__app_name.json create mode 100644 model/attributes/app/app__app_start_time.json create mode 100644 model/attributes/app/app__app_version.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 6e68f75d..aa0cd812 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -733,6 +733,121 @@ export const AI_WARNINGS = 'ai.warnings'; */ export type AI_WARNINGS_TYPE = Array; +// Path: model/attributes/app/app__app_build.json + +/** + * Internal build identifier, as it appears on the platform. `app.app_build` + * + * Attribute Value Type: `string` {@link APP_APP_BUILD_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link APP_BUILD} `app.build` + * + * @deprecated Use {@link APP_BUILD} (app.build) instead - Deprecated in favor of app.build + * @example "1" + */ +export const APP_APP_BUILD = 'app.app_build'; + +/** + * Type for {@link APP_APP_BUILD} app.app_build + */ +export type APP_APP_BUILD_TYPE = string; + +// Path: model/attributes/app/app__app_identifier.json + +/** + * Version-independent application identifier, often a dotted bundle ID. `app.app_identifier` + * + * Attribute Value Type: `string` {@link APP_APP_IDENTIFIER_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link APP_IDENTIFIER} `app.identifier` + * + * @deprecated Use {@link APP_IDENTIFIER} (app.identifier) instead - Deprecated in favor of app.identifier + * @example "com.example.myapp" + */ +export const APP_APP_IDENTIFIER = 'app.app_identifier'; + +/** + * Type for {@link APP_APP_IDENTIFIER} app.app_identifier + */ +export type APP_APP_IDENTIFIER_TYPE = string; + +// Path: model/attributes/app/app__app_name.json + +/** + * Human readable application name, as it appears on the platform. `app.app_name` + * + * Attribute Value Type: `string` {@link APP_APP_NAME_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link APP_NAME} `app.name` + * + * @deprecated Use {@link APP_NAME} (app.name) instead - Deprecated in favor of app.name + * @example "My App" + */ +export const APP_APP_NAME = 'app.app_name'; + +/** + * Type for {@link APP_APP_NAME} app.app_name + */ +export type APP_APP_NAME_TYPE = string; + +// Path: model/attributes/app/app__app_start_time.json + +/** + * Formatted UTC timestamp when the user started the application. `app.app_start_time` + * + * Attribute Value Type: `string` {@link APP_APP_START_TIME_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link APP_START_TIME} `app.start_time` + * + * @deprecated Use {@link APP_START_TIME} (app.start_time) instead - Deprecated in favor of app.start_time + * @example "2025-01-01T00:00:00.000Z" + */ +export const APP_APP_START_TIME = 'app.app_start_time'; + +/** + * Type for {@link APP_APP_START_TIME} app.app_start_time + */ +export type APP_APP_START_TIME_TYPE = string; + +// Path: model/attributes/app/app__app_version.json + +/** + * Human readable application version, as it appears on the platform. `app.app_version` + * + * Attribute Value Type: `string` {@link APP_APP_VERSION_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link APP_VERSION} `app.version` + * + * @deprecated Use {@link APP_VERSION} (app.version) instead - Deprecated in favor of app.version + * @example "1.0.0" + */ +export const APP_APP_VERSION = 'app.app_version'; + +/** + * Type for {@link APP_APP_VERSION} app.app_version + */ +export type APP_APP_VERSION_TYPE = string; + // Path: model/attributes/app/app__build.json /** @@ -744,6 +859,8 @@ export type AI_WARNINGS_TYPE = Array; * * Attribute defined in OTEL: No * + * Aliases: {@link APP_APP_BUILD} `app.app_build` + * * @example "1" */ export const APP_BUILD = 'app.build'; @@ -764,6 +881,8 @@ export type APP_BUILD_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link APP_APP_IDENTIFIER} `app.app_identifier` + * * @example "com.example.myapp" */ export const APP_IDENTIFIER = 'app.identifier'; @@ -804,6 +923,8 @@ export type APP_IN_FOREGROUND_TYPE = boolean; * * Attribute defined in OTEL: No * + * Aliases: {@link APP_APP_NAME} `app.app_name` + * * @example "My App" */ export const APP_NAME = 'app.name'; @@ -824,6 +945,8 @@ export type APP_NAME_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link APP_APP_START_TIME} `app.app_start_time` + * * @example "2025-01-01T00:00:00.000Z" */ export const APP_START_TIME = 'app.start_time'; @@ -864,6 +987,8 @@ export type APP_START_TYPE_TYPE = string; * * Attribute defined in OTEL: No * + * Aliases: {@link APP_APP_VERSION} `app.app_version` + * * @example "1.0.0" */ export const APP_VERSION = 'app.version'; @@ -10251,6 +10376,11 @@ export const ATTRIBUTE_TYPE: Record = { [AI_TOTAL_COST]: 'double', [AI_TOTAL_TOKENS_USED]: 'integer', [AI_WARNINGS]: 'string[]', + [APP_APP_BUILD]: 'string', + [APP_APP_IDENTIFIER]: 'string', + [APP_APP_NAME]: 'string', + [APP_APP_START_TIME]: 'string', + [APP_APP_VERSION]: 'string', [APP_BUILD]: 'string', [APP_IDENTIFIER]: 'string', [APP_IN_FOREGROUND]: 'boolean', @@ -10739,6 +10869,11 @@ export type AttributeName = | typeof AI_TOTAL_COST | typeof AI_TOTAL_TOKENS_USED | typeof AI_WARNINGS + | typeof APP_APP_BUILD + | typeof APP_APP_IDENTIFIER + | typeof APP_APP_NAME + | typeof APP_APP_START_TIME + | typeof APP_APP_VERSION | typeof APP_BUILD | typeof APP_IDENTIFIER | typeof APP_IN_FOREGROUND @@ -11694,6 +11829,102 @@ export const ATTRIBUTE_METADATA: Record = { { version: '0.1.0', prs: [55] }, ], }, + [APP_APP_BUILD]: { + brief: 'Internal build identifier, as it appears on the platform.', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: '1', + deprecation: { + replacement: 'app.build', + reason: 'Deprecated in favor of app.build', + }, + aliases: [APP_BUILD], + sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], + changelog: [ + { version: 'next', prs: [296], description: 'Added and deprecated app.app_build in favor of app.build' }, + ], + }, + [APP_APP_IDENTIFIER]: { + brief: 'Version-independent application identifier, often a dotted bundle ID.', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: 'com.example.myapp', + deprecation: { + replacement: 'app.identifier', + reason: 'Deprecated in favor of app.identifier', + }, + aliases: [APP_IDENTIFIER], + sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], + changelog: [ + { + version: 'next', + prs: [296], + description: 'Added and deprecated app.app_identifier in favor of app.identifier', + }, + ], + }, + [APP_APP_NAME]: { + brief: 'Human readable application name, as it appears on the platform.', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: 'My App', + deprecation: { + replacement: 'app.name', + reason: 'Deprecated in favor of app.name', + }, + aliases: [APP_NAME], + sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], + changelog: [{ version: 'next', prs: [296], description: 'Added and deprecated app.app_name in favor of app.name' }], + }, + [APP_APP_START_TIME]: { + brief: 'Formatted UTC timestamp when the user started the application.', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: '2025-01-01T00:00:00.000Z', + deprecation: { + replacement: 'app.start_time', + reason: 'Deprecated in favor of app.start_time', + }, + aliases: [APP_START_TIME], + sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], + changelog: [ + { + version: 'next', + prs: [296], + description: 'Added and deprecated app.app_start_time in favor of app.start_time', + }, + ], + }, + [APP_APP_VERSION]: { + brief: 'Human readable application version, as it appears on the platform.', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: '1.0.0', + deprecation: { + replacement: 'app.version', + reason: 'Deprecated in favor of app.version', + }, + aliases: [APP_VERSION], + sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], + changelog: [ + { version: 'next', prs: [296], description: 'Added and deprecated app.app_version in favor of app.version' }, + ], + }, [APP_BUILD]: { brief: 'Internal build identifier, as it appears on the platform.', type: 'string', @@ -11702,6 +11933,7 @@ export const ATTRIBUTE_METADATA: Record = { }, isInOtel: false, example: '1', + aliases: [APP_APP_BUILD], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], changelog: [{ version: 'next', prs: [296], description: 'Added app.build attribute' }], }, @@ -11713,6 +11945,7 @@ export const ATTRIBUTE_METADATA: Record = { }, isInOtel: false, example: 'com.example.myapp', + aliases: [APP_APP_IDENTIFIER], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], changelog: [{ version: 'next', prs: [296], description: 'Added app.identifier attribute' }], }, @@ -11735,6 +11968,7 @@ export const ATTRIBUTE_METADATA: Record = { }, isInOtel: false, example: 'My App', + aliases: [APP_APP_NAME], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], changelog: [{ version: 'next', prs: [296], description: 'Added app.name attribute' }], }, @@ -11746,6 +11980,7 @@ export const ATTRIBUTE_METADATA: Record = { }, isInOtel: false, example: '2025-01-01T00:00:00.000Z', + aliases: [APP_APP_START_TIME], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], changelog: [{ version: 'next', prs: [296], description: 'Added app.start_time attribute' }], }, @@ -11767,6 +12002,7 @@ export const ATTRIBUTE_METADATA: Record = { }, isInOtel: false, example: '1.0.0', + aliases: [APP_APP_VERSION], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], changelog: [{ version: 'next', prs: [296], description: 'Added app.version attribute' }], }, @@ -17130,6 +17366,11 @@ export type Attributes = { [AI_TOTAL_COST]?: AI_TOTAL_COST_TYPE; [AI_TOTAL_TOKENS_USED]?: AI_TOTAL_TOKENS_USED_TYPE; [AI_WARNINGS]?: AI_WARNINGS_TYPE; + [APP_APP_BUILD]?: APP_APP_BUILD_TYPE; + [APP_APP_IDENTIFIER]?: APP_APP_IDENTIFIER_TYPE; + [APP_APP_NAME]?: APP_APP_NAME_TYPE; + [APP_APP_START_TIME]?: APP_APP_START_TIME_TYPE; + [APP_APP_VERSION]?: APP_APP_VERSION_TYPE; [APP_BUILD]?: APP_BUILD_TYPE; [APP_IDENTIFIER]?: APP_IDENTIFIER_TYPE; [APP_IN_FOREGROUND]?: APP_IN_FOREGROUND_TYPE; diff --git a/model/attributes/app/app__app_build.json b/model/attributes/app/app__app_build.json new file mode 100644 index 00000000..26803006 --- /dev/null +++ b/model/attributes/app/app__app_build.json @@ -0,0 +1,24 @@ +{ + "key": "app.app_build", + "brief": "Internal build identifier, as it appears on the platform.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "1", + "alias": ["app.build"], + "deprecation": { + "replacement": "app.build", + "reason": "Deprecated in favor of app.build", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_build in favor of app.build" + } + ] +} diff --git a/model/attributes/app/app__app_identifier.json b/model/attributes/app/app__app_identifier.json new file mode 100644 index 00000000..9395ca77 --- /dev/null +++ b/model/attributes/app/app__app_identifier.json @@ -0,0 +1,24 @@ +{ + "key": "app.app_identifier", + "brief": "Version-independent application identifier, often a dotted bundle ID.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "com.example.myapp", + "alias": ["app.identifier"], + "deprecation": { + "replacement": "app.identifier", + "reason": "Deprecated in favor of app.identifier", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_identifier in favor of app.identifier" + } + ] +} diff --git a/model/attributes/app/app__app_name.json b/model/attributes/app/app__app_name.json new file mode 100644 index 00000000..208577a7 --- /dev/null +++ b/model/attributes/app/app__app_name.json @@ -0,0 +1,24 @@ +{ + "key": "app.app_name", + "brief": "Human readable application name, as it appears on the platform.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "My App", + "alias": ["app.name"], + "deprecation": { + "replacement": "app.name", + "reason": "Deprecated in favor of app.name", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_name in favor of app.name" + } + ] +} diff --git a/model/attributes/app/app__app_start_time.json b/model/attributes/app/app__app_start_time.json new file mode 100644 index 00000000..e632cbc2 --- /dev/null +++ b/model/attributes/app/app__app_start_time.json @@ -0,0 +1,24 @@ +{ + "key": "app.app_start_time", + "brief": "Formatted UTC timestamp when the user started the application.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "2025-01-01T00:00:00.000Z", + "alias": ["app.start_time"], + "deprecation": { + "replacement": "app.start_time", + "reason": "Deprecated in favor of app.start_time", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_start_time in favor of app.start_time" + } + ] +} diff --git a/model/attributes/app/app__app_version.json b/model/attributes/app/app__app_version.json new file mode 100644 index 00000000..9d1cbdf1 --- /dev/null +++ b/model/attributes/app/app__app_version.json @@ -0,0 +1,24 @@ +{ + "key": "app.app_version", + "brief": "Human readable application version, as it appears on the platform.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "1.0.0", + "alias": ["app.version"], + "deprecation": { + "replacement": "app.version", + "reason": "Deprecated in favor of app.version", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_version in favor of app.version" + } + ] +} diff --git a/model/attributes/app/app__build.json b/model/attributes/app/app__build.json index a8315320..67fd02ec 100644 --- a/model/attributes/app/app__build.json +++ b/model/attributes/app/app__build.json @@ -8,6 +8,7 @@ "is_in_otel": false, "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], "example": "1", + "alias": ["app.app_build"], "changelog": [ { "version": "next", diff --git a/model/attributes/app/app__identifier.json b/model/attributes/app/app__identifier.json index ddf56bf4..15f8b683 100644 --- a/model/attributes/app/app__identifier.json +++ b/model/attributes/app/app__identifier.json @@ -8,6 +8,7 @@ "is_in_otel": false, "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], "example": "com.example.myapp", + "alias": ["app.app_identifier"], "changelog": [ { "version": "next", diff --git a/model/attributes/app/app__name.json b/model/attributes/app/app__name.json index 0b667dea..1a81e576 100644 --- a/model/attributes/app/app__name.json +++ b/model/attributes/app/app__name.json @@ -8,6 +8,7 @@ "is_in_otel": false, "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], "example": "My App", + "alias": ["app.app_name"], "changelog": [ { "version": "next", diff --git a/model/attributes/app/app__start_time.json b/model/attributes/app/app__start_time.json index 0b93ad39..2c380bd3 100644 --- a/model/attributes/app/app__start_time.json +++ b/model/attributes/app/app__start_time.json @@ -8,6 +8,7 @@ "is_in_otel": false, "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], "example": "2025-01-01T00:00:00.000Z", + "alias": ["app.app_start_time"], "changelog": [ { "version": "next", diff --git a/model/attributes/app/app__version.json b/model/attributes/app/app__version.json index f4dc8f6d..ee168891 100644 --- a/model/attributes/app/app__version.json +++ b/model/attributes/app/app__version.json @@ -8,6 +8,7 @@ "is_in_otel": false, "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], "example": "1.0.0", + "alias": ["app.app_version"], "changelog": [ { "version": "next", diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index a1602e9b..1018ac5c 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -136,6 +136,11 @@ class _AttributeNamesMeta(type): "AI_TOTAL_COST", "AI_TOTAL_TOKENS_USED", "AI_WARNINGS", + "APP_APP_BUILD", + "APP_APP_IDENTIFIER", + "APP_APP_NAME", + "APP_APP_START_TIME", + "APP_APP_VERSION", "CLS_SOURCE_KEY", "CLS", "CODE_FILEPATH", @@ -621,6 +626,66 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: ["Token limit exceeded"] """ + # Path: model/attributes/app/app__app_build.json + APP_APP_BUILD: Literal["app.app_build"] = "app.app_build" + """Internal build identifier, as it appears on the platform. + + Type: str + Contains PII: maybe + Defined in OTEL: No + Aliases: app.build + DEPRECATED: Use app.build instead - Deprecated in favor of app.build + Example: "1" + """ + + # Path: model/attributes/app/app__app_identifier.json + APP_APP_IDENTIFIER: Literal["app.app_identifier"] = "app.app_identifier" + """Version-independent application identifier, often a dotted bundle ID. + + Type: str + Contains PII: maybe + Defined in OTEL: No + Aliases: app.identifier + DEPRECATED: Use app.identifier instead - Deprecated in favor of app.identifier + Example: "com.example.myapp" + """ + + # Path: model/attributes/app/app__app_name.json + APP_APP_NAME: Literal["app.app_name"] = "app.app_name" + """Human readable application name, as it appears on the platform. + + Type: str + Contains PII: maybe + Defined in OTEL: No + Aliases: app.name + DEPRECATED: Use app.name instead - Deprecated in favor of app.name + Example: "My App" + """ + + # Path: model/attributes/app/app__app_start_time.json + APP_APP_START_TIME: Literal["app.app_start_time"] = "app.app_start_time" + """Formatted UTC timestamp when the user started the application. + + Type: str + Contains PII: maybe + Defined in OTEL: No + Aliases: app.start_time + DEPRECATED: Use app.start_time instead - Deprecated in favor of app.start_time + Example: "2025-01-01T00:00:00.000Z" + """ + + # Path: model/attributes/app/app__app_version.json + APP_APP_VERSION: Literal["app.app_version"] = "app.app_version" + """Human readable application version, as it appears on the platform. + + Type: str + Contains PII: maybe + Defined in OTEL: No + Aliases: app.version + DEPRECATED: Use app.version instead - Deprecated in favor of app.version + Example: "1.0.0" + """ + # Path: model/attributes/app/app__build.json APP_BUILD: Literal["app.build"] = "app.build" """Internal build identifier, as it appears on the platform. @@ -628,6 +693,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No + Aliases: app.app_build Example: "1" """ @@ -638,6 +704,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No + Aliases: app.app_identifier Example: "com.example.myapp" """ @@ -658,6 +725,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No + Aliases: app.app_name Example: "My App" """ @@ -668,6 +736,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No + Aliases: app.app_start_time Example: "2025-01-01T00:00:00.000Z" """ @@ -678,6 +747,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No + Aliases: app.app_version Example: "1.0.0" """ @@ -6057,12 +6127,143 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.1.0", prs=[55]), ], ), + "app.app_build": AttributeMetadata( + brief="Internal build identifier, as it appears on the platform.", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example="1", + deprecation=DeprecationInfo( + replacement="app.build", + reason="Deprecated in favor of app.build", + status=DeprecationStatus.BACKFILL, + ), + aliases=["app.build"], + sdks=[ + "sentry.cocoa", + "sentry.java.android", + "sentry.javascript.react-native", + "sentry.dart.flutter", + ], + changelog=[ + ChangelogEntry( + version="next", + prs=[296], + description="Added and deprecated app.app_build in favor of app.build", + ), + ], + ), + "app.app_identifier": AttributeMetadata( + brief="Version-independent application identifier, often a dotted bundle ID.", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example="com.example.myapp", + deprecation=DeprecationInfo( + replacement="app.identifier", + reason="Deprecated in favor of app.identifier", + status=DeprecationStatus.BACKFILL, + ), + aliases=["app.identifier"], + sdks=[ + "sentry.cocoa", + "sentry.java.android", + "sentry.javascript.react-native", + "sentry.dart.flutter", + ], + changelog=[ + ChangelogEntry( + version="next", + prs=[296], + description="Added and deprecated app.app_identifier in favor of app.identifier", + ), + ], + ), + "app.app_name": AttributeMetadata( + brief="Human readable application name, as it appears on the platform.", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example="My App", + deprecation=DeprecationInfo( + replacement="app.name", + reason="Deprecated in favor of app.name", + status=DeprecationStatus.BACKFILL, + ), + aliases=["app.name"], + sdks=[ + "sentry.cocoa", + "sentry.java.android", + "sentry.javascript.react-native", + "sentry.dart.flutter", + ], + changelog=[ + ChangelogEntry( + version="next", + prs=[296], + description="Added and deprecated app.app_name in favor of app.name", + ), + ], + ), + "app.app_start_time": AttributeMetadata( + brief="Formatted UTC timestamp when the user started the application.", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example="2025-01-01T00:00:00.000Z", + deprecation=DeprecationInfo( + replacement="app.start_time", + reason="Deprecated in favor of app.start_time", + status=DeprecationStatus.BACKFILL, + ), + aliases=["app.start_time"], + sdks=[ + "sentry.cocoa", + "sentry.java.android", + "sentry.javascript.react-native", + "sentry.dart.flutter", + ], + changelog=[ + ChangelogEntry( + version="next", + prs=[296], + description="Added and deprecated app.app_start_time in favor of app.start_time", + ), + ], + ), + "app.app_version": AttributeMetadata( + brief="Human readable application version, as it appears on the platform.", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example="1.0.0", + deprecation=DeprecationInfo( + replacement="app.version", + reason="Deprecated in favor of app.version", + status=DeprecationStatus.BACKFILL, + ), + aliases=["app.version"], + sdks=[ + "sentry.cocoa", + "sentry.java.android", + "sentry.javascript.react-native", + "sentry.dart.flutter", + ], + changelog=[ + ChangelogEntry( + version="next", + prs=[296], + description="Added and deprecated app.app_version in favor of app.version", + ), + ], + ), "app.build": AttributeMetadata( brief="Internal build identifier, as it appears on the platform.", type=AttributeType.STRING, pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=False, example="1", + aliases=["app.app_build"], sdks=[ "sentry.cocoa", "sentry.java.android", @@ -6081,6 +6282,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=False, example="com.example.myapp", + aliases=["app.app_identifier"], sdks=[ "sentry.cocoa", "sentry.java.android", @@ -6119,6 +6321,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=False, example="My App", + aliases=["app.app_name"], sdks=[ "sentry.cocoa", "sentry.java.android", @@ -6137,6 +6340,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=False, example="2025-01-01T00:00:00.000Z", + aliases=["app.app_start_time"], sdks=[ "sentry.cocoa", "sentry.java.android", @@ -6155,6 +6359,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=False, example="1.0.0", + aliases=["app.app_version"], sdks=[ "sentry.cocoa", "sentry.java.android", @@ -11528,6 +11733,11 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "ai.total_cost": float, "ai.total_tokens.used": int, "ai.warnings": List[str], + "app.app_build": str, + "app.app_identifier": str, + "app.app_name": str, + "app.app_start_time": str, + "app.app_version": str, "app.build": str, "app.identifier": str, "app.in_foreground": bool, diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index 9e75c710..6697a1ee 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -1229,6 +1229,126 @@ } ] }, + { + "key": "app.app_build", + "brief": "Internal build identifier, as it appears on the platform.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "1", + "alias": ["app.build"], + "deprecation": { + "replacement": "app.build", + "reason": "Deprecated in favor of app.build", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_build in favor of app.build" + } + ] + }, + { + "key": "app.app_identifier", + "brief": "Version-independent application identifier, often a dotted bundle ID.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "com.example.myapp", + "alias": ["app.identifier"], + "deprecation": { + "replacement": "app.identifier", + "reason": "Deprecated in favor of app.identifier", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_identifier in favor of app.identifier" + } + ] + }, + { + "key": "app.app_name", + "brief": "Human readable application name, as it appears on the platform.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "My App", + "alias": ["app.name"], + "deprecation": { + "replacement": "app.name", + "reason": "Deprecated in favor of app.name", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_name in favor of app.name" + } + ] + }, + { + "key": "app.app_start_time", + "brief": "Formatted UTC timestamp when the user started the application.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "2025-01-01T00:00:00.000Z", + "alias": ["app.start_time"], + "deprecation": { + "replacement": "app.start_time", + "reason": "Deprecated in favor of app.start_time", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_start_time in favor of app.start_time" + } + ] + }, + { + "key": "app.app_version", + "brief": "Human readable application version, as it appears on the platform.", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], + "example": "1.0.0", + "alias": ["app.version"], + "deprecation": { + "replacement": "app.version", + "reason": "Deprecated in favor of app.version", + "_status": "backfill" + }, + "changelog": [ + { + "version": "next", + "prs": [296], + "description": "Added and deprecated app.app_version in favor of app.version" + } + ] + }, { "key": "cls.source.", "brief": "The HTML elements or components responsible for the layout shift. is a numeric index from 1 to N", From b7c26809cac38c33bcbaad70b134f7cd6be12302 Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Mon, 30 Mar 2026 14:36:28 +0200 Subject: [PATCH 2/4] fix(attributes): Set app.in_foreground pii to maybe Co-Authored-By: Claude Opus 4.6 (1M context) --- javascript/sentry-conventions/src/attributes.ts | 4 ++-- model/attributes/app/app__in_foreground.json | 2 +- python/src/sentry_conventions/attributes.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index aa0cd812..9eff89c9 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -899,7 +899,7 @@ export type APP_IDENTIFIER_TYPE = string; * * Attribute Value Type: `boolean` {@link APP_IN_FOREGROUND_TYPE} * - * Contains PII: false + * Contains PII: maybe * * Attribute defined in OTEL: No * @@ -11953,7 +11953,7 @@ export const ATTRIBUTE_METADATA: Record = { brief: 'Whether the application is currently in the foreground.', type: 'boolean', pii: { - isPii: 'false', + isPii: 'maybe', }, isInOtel: false, example: true, diff --git a/model/attributes/app/app__in_foreground.json b/model/attributes/app/app__in_foreground.json index 13b60a6d..e48efd43 100644 --- a/model/attributes/app/app__in_foreground.json +++ b/model/attributes/app/app__in_foreground.json @@ -3,7 +3,7 @@ "brief": "Whether the application is currently in the foreground.", "type": "boolean", "pii": { - "key": "false" + "key": "maybe" }, "is_in_otel": false, "sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"], diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 1018ac5c..3b8c4e7d 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -713,7 +713,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): """Whether the application is currently in the foreground. Type: bool - Contains PII: false + Contains PII: maybe Defined in OTEL: No Example: true """ @@ -6298,7 +6298,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "app.in_foreground": AttributeMetadata( brief="Whether the application is currently in the foreground.", type=AttributeType.BOOLEAN, - pii=PiiInfo(isPii=IsPii.FALSE), + pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=False, example=True, sdks=[ From 7688327ebb79ad976740453ca873513dbd91debc Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Wed, 8 Apr 2026 13:37:29 +0200 Subject: [PATCH 3/4] fix(attributes): Include deprecation status in generated TypeScript The TypeScript code generator was not emitting the `_status` field from deprecation metadata, unlike the Python generator. Add `DeprecationStatus` type and `status` property to the TS `DeprecationInfo` interface and emit it during generation. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../sentry-conventions/src/attributes.ts | 36 +++++++++++++++++++ scripts/generate_attributes.ts | 7 ++++ 2 files changed, 43 insertions(+) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 9eff89c9..0c24d4c9 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -10303,11 +10303,15 @@ export interface PiiInfo { reason?: string; } +export type DeprecationStatus = 'backfill' | 'normalize'; + export interface DeprecationInfo { /** What this attribute was replaced with */ replacement?: string; /** Reason for deprecation */ reason?: string; + /** The deprecation status */ + status?: DeprecationStatus; } export interface ChangelogEntry { @@ -11840,6 +11844,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.build', reason: 'Deprecated in favor of app.build', + status: 'backfill', }, aliases: [APP_BUILD], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11858,6 +11863,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.identifier', reason: 'Deprecated in favor of app.identifier', + status: 'backfill', }, aliases: [APP_IDENTIFIER], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11880,6 +11886,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.name', reason: 'Deprecated in favor of app.name', + status: 'backfill', }, aliases: [APP_NAME], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11896,6 +11903,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.start_time', reason: 'Deprecated in favor of app.start_time', + status: 'backfill', }, aliases: [APP_START_TIME], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11918,6 +11926,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.version', reason: 'Deprecated in favor of app.version', + status: 'backfill', }, aliases: [APP_VERSION], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -12393,6 +12402,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.cls.value', reason: 'The CLS web vital is now recorded as a browser.web_vital.cls.value attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_CLS_VALUE], sdks: ['javascript-browser'], @@ -12416,6 +12426,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.cls.source.', reason: 'The CLS source is now recorded as a browser.web_vital.cls.source. attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_CLS_SOURCE_KEY], sdks: ['javascript-browser'], @@ -12526,6 +12537,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'network.connection.type', reason: 'Old namespace-less attribute, to be replaced with network.connection.type for span-first future', + status: 'backfill', }, aliases: [NETWORK_CONNECTION_TYPE], sdks: ['javascript-browser'], @@ -12549,6 +12561,7 @@ export const ATTRIBUTE_METADATA: Record = { replacement: 'network.connection.rtt', reason: 'Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future', + status: 'backfill', }, aliases: [NETWORK_CONNECTION_RTT], sdks: ['javascript-browser'], @@ -12655,6 +12668,7 @@ export const ATTRIBUTE_METADATA: Record = { example: 'SELECT', deprecation: { replacement: 'db.operation.name', + status: 'normalize', }, aliases: [DB_OPERATION_NAME], changelog: [{ version: '0.4.0', prs: [199] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], @@ -12753,6 +12767,7 @@ export const ATTRIBUTE_METADATA: Record = { example: 'SELECT * FROM users', deprecation: { replacement: 'db.query.text', + status: 'normalize', }, aliases: [DB_QUERY_TEXT], changelog: [{ version: '0.4.0', prs: [199] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], @@ -12768,6 +12783,7 @@ export const ATTRIBUTE_METADATA: Record = { example: 'postgresql', deprecation: { replacement: 'db.system.name', + status: 'backfill', }, aliases: [DB_SYSTEM_NAME], changelog: [{ version: '0.4.0', prs: [199, 224] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], @@ -12806,6 +12822,7 @@ export const ATTRIBUTE_METADATA: Record = { replacement: 'device.memory.estimated_capacity', reason: 'Old namespace-less attribute, to be replaced with device.memory.estimated_capacity for span-first future', + status: 'backfill', }, aliases: [DEVICE_MEMORY_ESTIMATED_CAPACITY], sdks: ['javascript-browser'], @@ -12951,6 +12968,7 @@ export const ATTRIBUTE_METADATA: Record = { replacement: 'network.connection.effective_type', reason: 'Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future', + status: 'backfill', }, aliases: [NETWORK_CONNECTION_EFFECTIVE_TYPE], sdks: ['javascript-browser'], @@ -13101,6 +13119,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.fcp.value', reason: 'This attribute is being deprecated in favor of browser.web_vital.fcp.value', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_FCP_VALUE], sdks: ['javascript-browser'], @@ -13129,6 +13148,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.fp.value', reason: 'This attribute is being deprecated in favor of browser.web_vital.fp.value', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_FP_VALUE], sdks: ['javascript-browser'], @@ -13908,6 +13928,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'device.processor_count', reason: 'Old namespace-less attribute, to be replaced with device.processor_count for span-first future', + status: 'backfill', }, aliases: [DEVICE_PROCESSOR_COUNT], sdks: ['javascript-browser'], @@ -14237,6 +14258,7 @@ export const ATTRIBUTE_METADATA: Record = { example: 123, deprecation: { replacement: 'http.response.body.size', + status: 'backfill', }, aliases: [HTTP_RESPONSE_BODY_SIZE, HTTP_RESPONSE_HEADER_CONTENT_LENGTH], changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61, 106] }, { version: '0.0.0' }], @@ -14299,6 +14321,7 @@ export const ATTRIBUTE_METADATA: Record = { example: 456, deprecation: { replacement: 'http.response.size', + status: 'backfill', }, aliases: [HTTP_RESPONSE_SIZE], changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }], @@ -14433,6 +14456,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.inp.value', reason: 'The INP web vital is now recorded as a browser.web_vital.inp.value attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_INP_VALUE], sdks: ['javascript-browser'], @@ -14515,6 +14539,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.value', reason: 'The LCP web vital is now recorded as a browser.web_vital.lcp.value attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_VALUE], sdks: ['javascript-browser'], @@ -14537,6 +14562,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.element', reason: 'The LCP element is now recorded as a browser.web_vital.lcp.element attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_ELEMENT], changelog: [{ version: 'next', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }], @@ -14552,6 +14578,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.id', reason: 'The LCP id is now recorded as a browser.web_vital.lcp.id attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_ID], changelog: [{ version: 'next', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }], @@ -14567,6 +14594,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.load_time', reason: 'The LCP load time is now recorded as a browser.web_vital.lcp.load_time attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_LOAD_TIME], sdks: ['javascript-browser'], @@ -14583,6 +14611,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.render_time', reason: 'The LCP render time is now recorded as a browser.web_vital.lcp.render_time attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_RENDER_TIME], sdks: ['javascript-browser'], @@ -14599,6 +14628,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.size', reason: 'The LCP size is now recorded as a browser.web_vital.lcp.size attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_SIZE], changelog: [{ version: 'next', prs: [233] }, { version: '0.4.0', prs: [228] }, { version: '0.0.0' }], @@ -14614,6 +14644,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.url', reason: 'The LCP url is now recorded as a browser.web_vital.lcp.url attribute.', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_URL], changelog: [{ version: 'next', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }], @@ -15818,6 +15849,7 @@ export const ATTRIBUTE_METADATA: Record = { example: 'production', deprecation: { replacement: 'sentry.environment', + status: 'backfill', }, changelog: [{ version: 'next', prs: [266] }], }, @@ -15831,6 +15863,7 @@ export const ATTRIBUTE_METADATA: Record = { example: 'production', deprecation: { replacement: 'sentry.environment', + status: 'backfill', }, changelog: [{ version: '0.3.1', prs: [196] }], }, @@ -16394,6 +16427,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'sentry.span.source', reason: 'This attribute is being deprecated in favor of sentry.span.source', + status: 'backfill', }, changelog: [{ version: 'next' }], }, @@ -16566,6 +16600,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.ttfb.value', reason: 'This attribute is being deprecated in favor of browser.web_vital.ttfb.value', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_TTFB_VALUE], sdks: ['javascript-browser'], @@ -16583,6 +16618,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.ttfb.request_time', reason: 'This attribute is being deprecated in favor of browser.web_vital.ttfb.request_time', + status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_TTFB_REQUEST_TIME], sdks: ['javascript-browser'], diff --git a/scripts/generate_attributes.ts b/scripts/generate_attributes.ts index b905f47e..620a4228 100644 --- a/scripts/generate_attributes.ts +++ b/scripts/generate_attributes.ts @@ -661,11 +661,15 @@ export interface PiiInfo { reason?: string; } +export type DeprecationStatus = 'backfill' | 'normalize'; + export interface DeprecationInfo { /** What this attribute was replaced with */ replacement?: string; /** Reason for deprecation */ reason?: string; + /** The deprecation status */ + status?: DeprecationStatus; } export interface ChangelogEntry { @@ -768,6 +772,9 @@ function generateMetadataDict( if (deprecation.reason) { deprecationFields.push(`\n reason: ${JSON.stringify(deprecation.reason)}`); } + if (deprecation._status) { + deprecationFields.push(`\n status: ${JSON.stringify(deprecation._status)}`); + } if (deprecationFields.length > 0) { metadataDict += deprecationFields.join(','); metadataDict += '\n },\n'; From f395de352d7307588a13963b7e44a86393a8ff87 Mon Sep 17 00:00:00 2001 From: Giancarlo Buenaflor Date: Wed, 8 Apr 2026 14:04:44 +0200 Subject: [PATCH 4/4] Revert "fix(attributes): Include deprecation status in generated TypeScript" This reverts commit 7688327ebb79ad976740453ca873513dbd91debc. --- .../sentry-conventions/src/attributes.ts | 36 ------------------- scripts/generate_attributes.ts | 7 ---- 2 files changed, 43 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 0c24d4c9..9eff89c9 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -10303,15 +10303,11 @@ export interface PiiInfo { reason?: string; } -export type DeprecationStatus = 'backfill' | 'normalize'; - export interface DeprecationInfo { /** What this attribute was replaced with */ replacement?: string; /** Reason for deprecation */ reason?: string; - /** The deprecation status */ - status?: DeprecationStatus; } export interface ChangelogEntry { @@ -11844,7 +11840,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.build', reason: 'Deprecated in favor of app.build', - status: 'backfill', }, aliases: [APP_BUILD], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11863,7 +11858,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.identifier', reason: 'Deprecated in favor of app.identifier', - status: 'backfill', }, aliases: [APP_IDENTIFIER], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11886,7 +11880,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.name', reason: 'Deprecated in favor of app.name', - status: 'backfill', }, aliases: [APP_NAME], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11903,7 +11896,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.start_time', reason: 'Deprecated in favor of app.start_time', - status: 'backfill', }, aliases: [APP_START_TIME], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -11926,7 +11918,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'app.version', reason: 'Deprecated in favor of app.version', - status: 'backfill', }, aliases: [APP_VERSION], sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'], @@ -12402,7 +12393,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.cls.value', reason: 'The CLS web vital is now recorded as a browser.web_vital.cls.value attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_CLS_VALUE], sdks: ['javascript-browser'], @@ -12426,7 +12416,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.cls.source.', reason: 'The CLS source is now recorded as a browser.web_vital.cls.source. attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_CLS_SOURCE_KEY], sdks: ['javascript-browser'], @@ -12537,7 +12526,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'network.connection.type', reason: 'Old namespace-less attribute, to be replaced with network.connection.type for span-first future', - status: 'backfill', }, aliases: [NETWORK_CONNECTION_TYPE], sdks: ['javascript-browser'], @@ -12561,7 +12549,6 @@ export const ATTRIBUTE_METADATA: Record = { replacement: 'network.connection.rtt', reason: 'Old attribute name (no official namespace), to be replaced with network.connection.rtt for span-first future', - status: 'backfill', }, aliases: [NETWORK_CONNECTION_RTT], sdks: ['javascript-browser'], @@ -12668,7 +12655,6 @@ export const ATTRIBUTE_METADATA: Record = { example: 'SELECT', deprecation: { replacement: 'db.operation.name', - status: 'normalize', }, aliases: [DB_OPERATION_NAME], changelog: [{ version: '0.4.0', prs: [199] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], @@ -12767,7 +12753,6 @@ export const ATTRIBUTE_METADATA: Record = { example: 'SELECT * FROM users', deprecation: { replacement: 'db.query.text', - status: 'normalize', }, aliases: [DB_QUERY_TEXT], changelog: [{ version: '0.4.0', prs: [199] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], @@ -12783,7 +12768,6 @@ export const ATTRIBUTE_METADATA: Record = { example: 'postgresql', deprecation: { replacement: 'db.system.name', - status: 'backfill', }, aliases: [DB_SYSTEM_NAME], changelog: [{ version: '0.4.0', prs: [199, 224] }, { version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], @@ -12822,7 +12806,6 @@ export const ATTRIBUTE_METADATA: Record = { replacement: 'device.memory.estimated_capacity', reason: 'Old namespace-less attribute, to be replaced with device.memory.estimated_capacity for span-first future', - status: 'backfill', }, aliases: [DEVICE_MEMORY_ESTIMATED_CAPACITY], sdks: ['javascript-browser'], @@ -12968,7 +12951,6 @@ export const ATTRIBUTE_METADATA: Record = { replacement: 'network.connection.effective_type', reason: 'Old namespace-less attribute, to be replaced with network.connection.effective_type for span-first future', - status: 'backfill', }, aliases: [NETWORK_CONNECTION_EFFECTIVE_TYPE], sdks: ['javascript-browser'], @@ -13119,7 +13101,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.fcp.value', reason: 'This attribute is being deprecated in favor of browser.web_vital.fcp.value', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_FCP_VALUE], sdks: ['javascript-browser'], @@ -13148,7 +13129,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.fp.value', reason: 'This attribute is being deprecated in favor of browser.web_vital.fp.value', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_FP_VALUE], sdks: ['javascript-browser'], @@ -13928,7 +13908,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'device.processor_count', reason: 'Old namespace-less attribute, to be replaced with device.processor_count for span-first future', - status: 'backfill', }, aliases: [DEVICE_PROCESSOR_COUNT], sdks: ['javascript-browser'], @@ -14258,7 +14237,6 @@ export const ATTRIBUTE_METADATA: Record = { example: 123, deprecation: { replacement: 'http.response.body.size', - status: 'backfill', }, aliases: [HTTP_RESPONSE_BODY_SIZE, HTTP_RESPONSE_HEADER_CONTENT_LENGTH], changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61, 106] }, { version: '0.0.0' }], @@ -14321,7 +14299,6 @@ export const ATTRIBUTE_METADATA: Record = { example: 456, deprecation: { replacement: 'http.response.size', - status: 'backfill', }, aliases: [HTTP_RESPONSE_SIZE], changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.1.0', prs: [61] }, { version: '0.0.0' }], @@ -14456,7 +14433,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.inp.value', reason: 'The INP web vital is now recorded as a browser.web_vital.inp.value attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_INP_VALUE], sdks: ['javascript-browser'], @@ -14539,7 +14515,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.value', reason: 'The LCP web vital is now recorded as a browser.web_vital.lcp.value attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_VALUE], sdks: ['javascript-browser'], @@ -14562,7 +14537,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.element', reason: 'The LCP element is now recorded as a browser.web_vital.lcp.element attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_ELEMENT], changelog: [{ version: 'next', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }], @@ -14578,7 +14552,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.id', reason: 'The LCP id is now recorded as a browser.web_vital.lcp.id attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_ID], changelog: [{ version: 'next', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }], @@ -14594,7 +14567,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.load_time', reason: 'The LCP load time is now recorded as a browser.web_vital.lcp.load_time attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_LOAD_TIME], sdks: ['javascript-browser'], @@ -14611,7 +14583,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.render_time', reason: 'The LCP render time is now recorded as a browser.web_vital.lcp.render_time attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_RENDER_TIME], sdks: ['javascript-browser'], @@ -14628,7 +14599,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.size', reason: 'The LCP size is now recorded as a browser.web_vital.lcp.size attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_SIZE], changelog: [{ version: 'next', prs: [233] }, { version: '0.4.0', prs: [228] }, { version: '0.0.0' }], @@ -14644,7 +14614,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.lcp.url', reason: 'The LCP url is now recorded as a browser.web_vital.lcp.url attribute.', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_LCP_URL], changelog: [{ version: 'next', prs: [233] }, { version: '0.1.0', prs: [127] }, { version: '0.0.0' }], @@ -15849,7 +15818,6 @@ export const ATTRIBUTE_METADATA: Record = { example: 'production', deprecation: { replacement: 'sentry.environment', - status: 'backfill', }, changelog: [{ version: 'next', prs: [266] }], }, @@ -15863,7 +15831,6 @@ export const ATTRIBUTE_METADATA: Record = { example: 'production', deprecation: { replacement: 'sentry.environment', - status: 'backfill', }, changelog: [{ version: '0.3.1', prs: [196] }], }, @@ -16427,7 +16394,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'sentry.span.source', reason: 'This attribute is being deprecated in favor of sentry.span.source', - status: 'backfill', }, changelog: [{ version: 'next' }], }, @@ -16600,7 +16566,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.ttfb.value', reason: 'This attribute is being deprecated in favor of browser.web_vital.ttfb.value', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_TTFB_VALUE], sdks: ['javascript-browser'], @@ -16618,7 +16583,6 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'browser.web_vital.ttfb.request_time', reason: 'This attribute is being deprecated in favor of browser.web_vital.ttfb.request_time', - status: 'backfill', }, aliases: [BROWSER_WEB_VITAL_TTFB_REQUEST_TIME], sdks: ['javascript-browser'], diff --git a/scripts/generate_attributes.ts b/scripts/generate_attributes.ts index 620a4228..b905f47e 100644 --- a/scripts/generate_attributes.ts +++ b/scripts/generate_attributes.ts @@ -661,15 +661,11 @@ export interface PiiInfo { reason?: string; } -export type DeprecationStatus = 'backfill' | 'normalize'; - export interface DeprecationInfo { /** What this attribute was replaced with */ replacement?: string; /** Reason for deprecation */ reason?: string; - /** The deprecation status */ - status?: DeprecationStatus; } export interface ChangelogEntry { @@ -772,9 +768,6 @@ function generateMetadataDict( if (deprecation.reason) { deprecationFields.push(`\n reason: ${JSON.stringify(deprecation.reason)}`); } - if (deprecation._status) { - deprecationFields.push(`\n status: ${JSON.stringify(deprecation._status)}`); - } if (deprecationFields.length > 0) { metadataDict += deprecationFields.join(','); metadataDict += '\n },\n';