Skip to content

Commit 278a080

Browse files
buenaflorclaude
andcommitted
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) <noreply@anthropic.com>
1 parent ad8779e commit 278a080

13 files changed

Lines changed: 696 additions & 0 deletions

File tree

javascript/sentry-conventions/src/attributes.ts

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,121 @@ export const AI_WARNINGS = 'ai.warnings';
733733
*/
734734
export type AI_WARNINGS_TYPE = Array<string>;
735735

736+
// Path: model/attributes/app/app__app_build.json
737+
738+
/**
739+
* Internal build identifier, as it appears on the platform. `app.app_build`
740+
*
741+
* Attribute Value Type: `string` {@link APP_APP_BUILD_TYPE}
742+
*
743+
* Contains PII: maybe
744+
*
745+
* Attribute defined in OTEL: No
746+
*
747+
* Aliases: {@link APP_BUILD} `app.build`
748+
*
749+
* @deprecated Use {@link APP_BUILD} (app.build) instead - Deprecated in favor of app.build
750+
* @example "1"
751+
*/
752+
export const APP_APP_BUILD = 'app.app_build';
753+
754+
/**
755+
* Type for {@link APP_APP_BUILD} app.app_build
756+
*/
757+
export type APP_APP_BUILD_TYPE = string;
758+
759+
// Path: model/attributes/app/app__app_identifier.json
760+
761+
/**
762+
* Version-independent application identifier, often a dotted bundle ID. `app.app_identifier`
763+
*
764+
* Attribute Value Type: `string` {@link APP_APP_IDENTIFIER_TYPE}
765+
*
766+
* Contains PII: maybe
767+
*
768+
* Attribute defined in OTEL: No
769+
*
770+
* Aliases: {@link APP_IDENTIFIER} `app.identifier`
771+
*
772+
* @deprecated Use {@link APP_IDENTIFIER} (app.identifier) instead - Deprecated in favor of app.identifier
773+
* @example "com.example.myapp"
774+
*/
775+
export const APP_APP_IDENTIFIER = 'app.app_identifier';
776+
777+
/**
778+
* Type for {@link APP_APP_IDENTIFIER} app.app_identifier
779+
*/
780+
export type APP_APP_IDENTIFIER_TYPE = string;
781+
782+
// Path: model/attributes/app/app__app_name.json
783+
784+
/**
785+
* Human readable application name, as it appears on the platform. `app.app_name`
786+
*
787+
* Attribute Value Type: `string` {@link APP_APP_NAME_TYPE}
788+
*
789+
* Contains PII: maybe
790+
*
791+
* Attribute defined in OTEL: No
792+
*
793+
* Aliases: {@link APP_NAME} `app.name`
794+
*
795+
* @deprecated Use {@link APP_NAME} (app.name) instead - Deprecated in favor of app.name
796+
* @example "My App"
797+
*/
798+
export const APP_APP_NAME = 'app.app_name';
799+
800+
/**
801+
* Type for {@link APP_APP_NAME} app.app_name
802+
*/
803+
export type APP_APP_NAME_TYPE = string;
804+
805+
// Path: model/attributes/app/app__app_start_time.json
806+
807+
/**
808+
* Formatted UTC timestamp when the user started the application. `app.app_start_time`
809+
*
810+
* Attribute Value Type: `string` {@link APP_APP_START_TIME_TYPE}
811+
*
812+
* Contains PII: maybe
813+
*
814+
* Attribute defined in OTEL: No
815+
*
816+
* Aliases: {@link APP_START_TIME} `app.start_time`
817+
*
818+
* @deprecated Use {@link APP_START_TIME} (app.start_time) instead - Deprecated in favor of app.start_time
819+
* @example "2025-01-01T00:00:00.000Z"
820+
*/
821+
export const APP_APP_START_TIME = 'app.app_start_time';
822+
823+
/**
824+
* Type for {@link APP_APP_START_TIME} app.app_start_time
825+
*/
826+
export type APP_APP_START_TIME_TYPE = string;
827+
828+
// Path: model/attributes/app/app__app_version.json
829+
830+
/**
831+
* Human readable application version, as it appears on the platform. `app.app_version`
832+
*
833+
* Attribute Value Type: `string` {@link APP_APP_VERSION_TYPE}
834+
*
835+
* Contains PII: maybe
836+
*
837+
* Attribute defined in OTEL: No
838+
*
839+
* Aliases: {@link APP_VERSION} `app.version`
840+
*
841+
* @deprecated Use {@link APP_VERSION} (app.version) instead - Deprecated in favor of app.version
842+
* @example "1.0.0"
843+
*/
844+
export const APP_APP_VERSION = 'app.app_version';
845+
846+
/**
847+
* Type for {@link APP_APP_VERSION} app.app_version
848+
*/
849+
export type APP_APP_VERSION_TYPE = string;
850+
736851
// Path: model/attributes/app/app__build.json
737852

738853
/**
@@ -744,6 +859,8 @@ export type AI_WARNINGS_TYPE = Array<string>;
744859
*
745860
* Attribute defined in OTEL: No
746861
*
862+
* Aliases: {@link APP_APP_BUILD} `app.app_build`
863+
*
747864
* @example "1"
748865
*/
749866
export const APP_BUILD = 'app.build';
@@ -764,6 +881,8 @@ export type APP_BUILD_TYPE = string;
764881
*
765882
* Attribute defined in OTEL: No
766883
*
884+
* Aliases: {@link APP_APP_IDENTIFIER} `app.app_identifier`
885+
*
767886
* @example "com.example.myapp"
768887
*/
769888
export const APP_IDENTIFIER = 'app.identifier';
@@ -804,6 +923,8 @@ export type APP_IN_FOREGROUND_TYPE = boolean;
804923
*
805924
* Attribute defined in OTEL: No
806925
*
926+
* Aliases: {@link APP_APP_NAME} `app.app_name`
927+
*
807928
* @example "My App"
808929
*/
809930
export const APP_NAME = 'app.name';
@@ -824,6 +945,8 @@ export type APP_NAME_TYPE = string;
824945
*
825946
* Attribute defined in OTEL: No
826947
*
948+
* Aliases: {@link APP_APP_START_TIME} `app.app_start_time`
949+
*
827950
* @example "2025-01-01T00:00:00.000Z"
828951
*/
829952
export const APP_START_TIME = 'app.start_time';
@@ -864,6 +987,8 @@ export type APP_START_TYPE_TYPE = string;
864987
*
865988
* Attribute defined in OTEL: No
866989
*
990+
* Aliases: {@link APP_APP_VERSION} `app.app_version`
991+
*
867992
* @example "1.0.0"
868993
*/
869994
export const APP_VERSION = 'app.version';
@@ -10601,6 +10726,11 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
1060110726
[AI_TOTAL_COST]: 'double',
1060210727
[AI_TOTAL_TOKENS_USED]: 'integer',
1060310728
[AI_WARNINGS]: 'string[]',
10729+
[APP_APP_BUILD]: 'string',
10730+
[APP_APP_IDENTIFIER]: 'string',
10731+
[APP_APP_NAME]: 'string',
10732+
[APP_APP_START_TIME]: 'string',
10733+
[APP_APP_VERSION]: 'string',
1060410734
[APP_BUILD]: 'string',
1060510735
[APP_IDENTIFIER]: 'string',
1060610736
[APP_IN_FOREGROUND]: 'boolean',
@@ -11107,6 +11237,11 @@ export type AttributeName =
1110711237
| typeof AI_TOTAL_COST
1110811238
| typeof AI_TOTAL_TOKENS_USED
1110911239
| typeof AI_WARNINGS
11240+
| typeof APP_APP_BUILD
11241+
| typeof APP_APP_IDENTIFIER
11242+
| typeof APP_APP_NAME
11243+
| typeof APP_APP_START_TIME
11244+
| typeof APP_APP_VERSION
1111011245
| typeof APP_BUILD
1111111246
| typeof APP_IDENTIFIER
1111211247
| typeof APP_IN_FOREGROUND
@@ -12080,6 +12215,102 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
1208012215
{ version: '0.1.0', prs: [55] },
1208112216
],
1208212217
},
12218+
[APP_APP_BUILD]: {
12219+
brief: 'Internal build identifier, as it appears on the platform.',
12220+
type: 'string',
12221+
pii: {
12222+
isPii: 'maybe',
12223+
},
12224+
isInOtel: false,
12225+
example: '1',
12226+
deprecation: {
12227+
replacement: 'app.build',
12228+
reason: 'Deprecated in favor of app.build',
12229+
},
12230+
aliases: [APP_BUILD],
12231+
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
12232+
changelog: [
12233+
{ version: 'next', prs: [296], description: 'Added and deprecated app.app_build in favor of app.build' },
12234+
],
12235+
},
12236+
[APP_APP_IDENTIFIER]: {
12237+
brief: 'Version-independent application identifier, often a dotted bundle ID.',
12238+
type: 'string',
12239+
pii: {
12240+
isPii: 'maybe',
12241+
},
12242+
isInOtel: false,
12243+
example: 'com.example.myapp',
12244+
deprecation: {
12245+
replacement: 'app.identifier',
12246+
reason: 'Deprecated in favor of app.identifier',
12247+
},
12248+
aliases: [APP_IDENTIFIER],
12249+
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
12250+
changelog: [
12251+
{
12252+
version: 'next',
12253+
prs: [296],
12254+
description: 'Added and deprecated app.app_identifier in favor of app.identifier',
12255+
},
12256+
],
12257+
},
12258+
[APP_APP_NAME]: {
12259+
brief: 'Human readable application name, as it appears on the platform.',
12260+
type: 'string',
12261+
pii: {
12262+
isPii: 'maybe',
12263+
},
12264+
isInOtel: false,
12265+
example: 'My App',
12266+
deprecation: {
12267+
replacement: 'app.name',
12268+
reason: 'Deprecated in favor of app.name',
12269+
},
12270+
aliases: [APP_NAME],
12271+
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
12272+
changelog: [{ version: 'next', prs: [296], description: 'Added and deprecated app.app_name in favor of app.name' }],
12273+
},
12274+
[APP_APP_START_TIME]: {
12275+
brief: 'Formatted UTC timestamp when the user started the application.',
12276+
type: 'string',
12277+
pii: {
12278+
isPii: 'maybe',
12279+
},
12280+
isInOtel: false,
12281+
example: '2025-01-01T00:00:00.000Z',
12282+
deprecation: {
12283+
replacement: 'app.start_time',
12284+
reason: 'Deprecated in favor of app.start_time',
12285+
},
12286+
aliases: [APP_START_TIME],
12287+
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
12288+
changelog: [
12289+
{
12290+
version: 'next',
12291+
prs: [296],
12292+
description: 'Added and deprecated app.app_start_time in favor of app.start_time',
12293+
},
12294+
],
12295+
},
12296+
[APP_APP_VERSION]: {
12297+
brief: 'Human readable application version, as it appears on the platform.',
12298+
type: 'string',
12299+
pii: {
12300+
isPii: 'maybe',
12301+
},
12302+
isInOtel: false,
12303+
example: '1.0.0',
12304+
deprecation: {
12305+
replacement: 'app.version',
12306+
reason: 'Deprecated in favor of app.version',
12307+
},
12308+
aliases: [APP_VERSION],
12309+
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
12310+
changelog: [
12311+
{ version: 'next', prs: [296], description: 'Added and deprecated app.app_version in favor of app.version' },
12312+
],
12313+
},
1208312314
[APP_BUILD]: {
1208412315
brief: 'Internal build identifier, as it appears on the platform.',
1208512316
type: 'string',
@@ -12088,6 +12319,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
1208812319
},
1208912320
isInOtel: false,
1209012321
example: '1',
12322+
aliases: [APP_APP_BUILD],
1209112323
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
1209212324
changelog: [{ version: 'next', prs: [296], description: 'Added app.build attribute' }],
1209312325
},
@@ -12099,6 +12331,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
1209912331
},
1210012332
isInOtel: false,
1210112333
example: 'com.example.myapp',
12334+
aliases: [APP_APP_IDENTIFIER],
1210212335
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
1210312336
changelog: [{ version: 'next', prs: [296], description: 'Added app.identifier attribute' }],
1210412337
},
@@ -12121,6 +12354,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
1212112354
},
1212212355
isInOtel: false,
1212312356
example: 'My App',
12357+
aliases: [APP_APP_NAME],
1212412358
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
1212512359
changelog: [{ version: 'next', prs: [296], description: 'Added app.name attribute' }],
1212612360
},
@@ -12132,6 +12366,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
1213212366
},
1213312367
isInOtel: false,
1213412368
example: '2025-01-01T00:00:00.000Z',
12369+
aliases: [APP_APP_START_TIME],
1213512370
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
1213612371
changelog: [{ version: 'next', prs: [296], description: 'Added app.start_time attribute' }],
1213712372
},
@@ -12153,6 +12388,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
1215312388
},
1215412389
isInOtel: false,
1215512390
example: '1.0.0',
12391+
aliases: [APP_APP_VERSION],
1215612392
sdks: ['sentry.cocoa', 'sentry.java.android', 'sentry.javascript.react-native', 'sentry.dart.flutter'],
1215712393
changelog: [{ version: 'next', prs: [296], description: 'Added app.version attribute' }],
1215812394
},
@@ -17647,6 +17883,11 @@ export type Attributes = {
1764717883
[AI_TOTAL_COST]?: AI_TOTAL_COST_TYPE;
1764817884
[AI_TOTAL_TOKENS_USED]?: AI_TOTAL_TOKENS_USED_TYPE;
1764917885
[AI_WARNINGS]?: AI_WARNINGS_TYPE;
17886+
[APP_APP_BUILD]?: APP_APP_BUILD_TYPE;
17887+
[APP_APP_IDENTIFIER]?: APP_APP_IDENTIFIER_TYPE;
17888+
[APP_APP_NAME]?: APP_APP_NAME_TYPE;
17889+
[APP_APP_START_TIME]?: APP_APP_START_TIME_TYPE;
17890+
[APP_APP_VERSION]?: APP_APP_VERSION_TYPE;
1765017891
[APP_BUILD]?: APP_BUILD_TYPE;
1765117892
[APP_IDENTIFIER]?: APP_IDENTIFIER_TYPE;
1765217893
[APP_IN_FOREGROUND]?: APP_IN_FOREGROUND_TYPE;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"key": "app.app_build",
3+
"brief": "Internal build identifier, as it appears on the platform.",
4+
"type": "string",
5+
"pii": {
6+
"key": "maybe"
7+
},
8+
"is_in_otel": false,
9+
"sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"],
10+
"example": "1",
11+
"alias": ["app.build"],
12+
"deprecation": {
13+
"replacement": "app.build",
14+
"reason": "Deprecated in favor of app.build",
15+
"_status": "backfill"
16+
},
17+
"changelog": [
18+
{
19+
"version": "next",
20+
"prs": [296],
21+
"description": "Added and deprecated app.app_build in favor of app.build"
22+
}
23+
]
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"key": "app.app_identifier",
3+
"brief": "Version-independent application identifier, often a dotted bundle ID.",
4+
"type": "string",
5+
"pii": {
6+
"key": "maybe"
7+
},
8+
"is_in_otel": false,
9+
"sdks": ["sentry.cocoa", "sentry.java.android", "sentry.javascript.react-native", "sentry.dart.flutter"],
10+
"example": "com.example.myapp",
11+
"alias": ["app.identifier"],
12+
"deprecation": {
13+
"replacement": "app.identifier",
14+
"reason": "Deprecated in favor of app.identifier",
15+
"_status": "backfill"
16+
},
17+
"changelog": [
18+
{
19+
"version": "next",
20+
"prs": [296],
21+
"description": "Added and deprecated app.app_identifier in favor of app.identifier"
22+
}
23+
]
24+
}

0 commit comments

Comments
 (0)