diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 041ac192..4492d801 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -10854,6 +10854,8 @@ export type PROCESS_EXECUTABLE_NAME_TYPE = string; * Attribute defined in OTEL: Yes * Visibility: public * + * Aliases: {@link SUBPROCESS_PID} `subprocess.pid` + * * @example 12345 */ export const PROCESS_PID = 'process.pid'; @@ -13169,6 +13171,30 @@ export const STATE_TYPE = 'state.type'; */ export type STATE_TYPE_TYPE = string; +// Path: model/attributes/subprocess/subprocess__pid.json + +/** + * The process ID of a subprocess. `subprocess.pid` + * + * Attribute Value Type: `number` {@link SUBPROCESS_PID_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * Aliases: {@link PROCESS_PID} `process.pid` + * + * @deprecated Use {@link PROCESS_PID} (process.pid) instead - This attribute is being deprecated in favor of process.pid, which is the OTel-aligned replacement. + * @example 12345 + */ +export const SUBPROCESS_PID = 'subprocess.pid'; + +/** + * Type for {@link SUBPROCESS_PID} subprocess.pid + */ +export type SUBPROCESS_PID_TYPE = number; + // Path: model/attributes/thread/thread__id.json /** @@ -15601,6 +15627,7 @@ export const ATTRIBUTE_TYPE: Record = { stall_percentage: 'double', stall_total_time: 'double', 'state.type': 'string', + 'subprocess.pid': 'integer', 'thread.id': 'integer', 'thread.name': 'string', 'timber.tag': 'string', @@ -16283,6 +16310,7 @@ export type AttributeName = | typeof STALL_PERCENTAGE | typeof STALL_TOTAL_TIME | typeof STATE_TYPE + | typeof SUBPROCESS_PID | typeof THREAD_ID | typeof THREAD_NAME | typeof TIMBER_TAG @@ -23067,7 +23095,12 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: true, visibility: 'public', example: 12345, - changelog: [{ version: '0.4.0', prs: [228] }, { version: '0.0.0' }], + aliases: ['subprocess.pid'], + changelog: [ + { version: 'next', description: 'Added subprocess.pid as an alias' }, + { version: '0.4.0', prs: [228] }, + { version: '0.0.0' }, + ], }, 'process.runtime.description': { brief: @@ -24402,6 +24435,22 @@ export const ATTRIBUTE_METADATA: Record = { example: 'redux', changelog: [{ version: '0.7.0', prs: [365], description: 'Added state.type attribute' }], }, + 'subprocess.pid': { + brief: 'The process ID of a subprocess.', + type: 'integer', + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 12345, + deprecation: { + replacement: 'process.pid', + reason: 'This attribute is being deprecated in favor of process.pid, which is the OTel-aligned replacement.', + }, + aliases: ['process.pid'], + changelog: [{ version: 'next', description: 'Added subprocess.pid attribute, deprecated in favor of process.pid' }], + }, 'thread.id': { brief: 'Current “managed” thread ID.', type: 'integer', @@ -25993,6 +26042,7 @@ export type Attributes = { [STALL_PERCENTAGE]?: STALL_PERCENTAGE_TYPE; [STALL_TOTAL_TIME]?: STALL_TOTAL_TIME_TYPE; [STATE_TYPE]?: STATE_TYPE_TYPE; + [SUBPROCESS_PID]?: SUBPROCESS_PID_TYPE; [THREAD_ID]?: THREAD_ID_TYPE; [THREAD_NAME]?: THREAD_NAME_TYPE; [TIMBER_TAG]?: TIMBER_TAG_TYPE; diff --git a/model/attributes/process/process__pid.json b/model/attributes/process/process__pid.json index 93ceba5f..48908284 100644 --- a/model/attributes/process/process__pid.json +++ b/model/attributes/process/process__pid.json @@ -7,8 +7,13 @@ }, "is_in_otel": true, "example": 12345, + "alias": ["subprocess.pid"], "visibility": "public", "changelog": [ + { + "version": "next", + "description": "Added subprocess.pid as an alias" + }, { "version": "0.4.0", "prs": [228] diff --git a/model/attributes/subprocess/subprocess__pid.json b/model/attributes/subprocess/subprocess__pid.json new file mode 100644 index 00000000..15182b71 --- /dev/null +++ b/model/attributes/subprocess/subprocess__pid.json @@ -0,0 +1,23 @@ +{ + "key": "subprocess.pid", + "brief": "The process ID of a subprocess.", + "type": "integer", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "example": 12345, + "alias": ["process.pid"], + "deprecation": { + "_status": "backfill", + "replacement": "process.pid", + "reason": "This attribute is being deprecated in favor of process.pid, which is the OTel-aligned replacement." + }, + "visibility": "public", + "changelog": [ + { + "version": "next", + "description": "Added subprocess.pid attribute, deprecated in favor of process.pid" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 90122d51..180d8a76 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -273,6 +273,7 @@ class _AttributeNamesMeta(type): "SENTRY_USER_ID", "SENTRY_USER_IP", "SENTRY_USER_USERNAME", + "SUBPROCESS_PID", "TIME_TO_FULL_DISPLAY", "TIME_TO_INITIAL_DISPLAY", "TRANSACTION", @@ -6383,6 +6384,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Apply Scrubbing: manual Defined in OTEL: Yes Visibility: public + Aliases: subprocess.pid Example: 12345 """ @@ -7659,6 +7661,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "redux" """ + # Path: model/attributes/subprocess/subprocess__pid.json + SUBPROCESS_PID: Literal["subprocess.pid"] = "subprocess.pid" + """The process ID of a subprocess. + + Type: int + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Aliases: process.pid + DEPRECATED: Use process.pid instead - This attribute is being deprecated in favor of process.pid, which is the OTel-aligned replacement. + Example: 12345 + """ + # Path: model/attributes/thread/thread__id.json THREAD_ID: Literal["thread.id"] = "thread.id" """Current “managed” thread ID. @@ -15848,7 +15863,11 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): is_in_otel=True, visibility=Visibility.PUBLIC, example=12345, + aliases=["subprocess.pid"], changelog=[ + ChangelogEntry( + version="next", description="Added subprocess.pid as an alias" + ), ChangelogEntry(version="0.4.0", prs=[228]), ChangelogEntry(version="0.0.0"), ], @@ -17206,6 +17225,26 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "subprocess.pid": AttributeMetadata( + brief="The process ID of a subprocess.", + type=AttributeType.INTEGER, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example=12345, + deprecation=DeprecationInfo( + replacement="process.pid", + reason="This attribute is being deprecated in favor of process.pid, which is the OTel-aligned replacement.", + status=DeprecationStatus.BACKFILL, + ), + aliases=["process.pid"], + changelog=[ + ChangelogEntry( + version="next", + description="Added subprocess.pid attribute, deprecated in favor of process.pid", + ), + ], + ), "thread.id": AttributeMetadata( brief="Current “managed” thread ID.", type=AttributeType.INTEGER, @@ -18841,6 +18880,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "stall_percentage": float, "stall_total_time": float, "state.type": str, + "subprocess.pid": int, "thread.id": int, "thread.name": str, "timber.tag": str,