From 83a3e59f13082dfbf0b91374bfbc571ddcaffde6 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Tue, 21 Apr 2026 12:46:27 +0200 Subject: [PATCH 1/2] feat: Add process.command_args --- .../sentry-conventions/src/attributes.ts | 34 +++++++++++++++++++ .../process/process__command_args.json | 18 ++++++++++ python/src/sentry_conventions/attributes.py | 26 ++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 model/attributes/process/process__command_args.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 487b43d8..845c640f 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -8376,6 +8376,26 @@ export const PREVIOUS_ROUTE = 'previous_route'; */ export type PREVIOUS_ROUTE_TYPE = string; +// Path: model/attributes/process/process__command_args.json + +/** + * All the command arguments (including the command/executable itself) as received by the process. `process.command_args` + * + * Attribute Value Type: `Array` {@link PROCESS_COMMAND_ARGS_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: Yes + * + * @example ["cmd/otecol","--config=config.yaml"] + */ +export const PROCESS_COMMAND_ARGS = 'process.command_args'; + +/** + * Type for {@link PROCESS_COMMAND_ARGS} process.command_args + */ +export type PROCESS_COMMAND_ARGS_TYPE = Array; + // Path: model/attributes/process/process__executable__name.json /** @@ -11983,6 +12003,7 @@ export const ATTRIBUTE_TYPE: Record = { [PERFORMANCE_ACTIVATIONSTART]: 'double', [PERFORMANCE_TIMEORIGIN]: 'double', [PREVIOUS_ROUTE]: 'string', + [PROCESS_COMMAND_ARGS]: 'string[]', [PROCESS_EXECUTABLE_NAME]: 'string', [PROCESS_PID]: 'integer', [PROCESS_RUNTIME_DESCRIPTION]: 'string', @@ -12535,6 +12556,7 @@ export type AttributeName = | typeof PERFORMANCE_ACTIVATIONSTART | typeof PERFORMANCE_TIMEORIGIN | typeof PREVIOUS_ROUTE + | typeof PROCESS_COMMAND_ARGS | typeof PROCESS_EXECUTABLE_NAME | typeof PROCESS_PID | typeof PROCESS_RUNTIME_DESCRIPTION @@ -17743,6 +17765,17 @@ export const ATTRIBUTE_METADATA: Record = { sdks: ['javascript-reactnative'], changelog: [{ version: '0.1.0', prs: [74] }, { version: '0.0.0' }], }, + [PROCESS_COMMAND_ARGS]: { + brief: 'All the command arguments (including the command/executable itself) as received by the process. ', + type: 'string[]', + pii: { + isPii: 'maybe', + }, + isInOtel: true, + example: ['cmd/otecol', '--config=config.yaml'], + sdks: ['python'], + changelog: [{ version: 'next', prs: [327], description: 'Added process.command_args attribute' }], + }, [PROCESS_EXECUTABLE_NAME]: { brief: 'The name of the executable that started the process.', type: 'string', @@ -19843,6 +19876,7 @@ export type Attributes = { [PERFORMANCE_ACTIVATIONSTART]?: PERFORMANCE_ACTIVATIONSTART_TYPE; [PERFORMANCE_TIMEORIGIN]?: PERFORMANCE_TIMEORIGIN_TYPE; [PREVIOUS_ROUTE]?: PREVIOUS_ROUTE_TYPE; + [PROCESS_COMMAND_ARGS]?: PROCESS_COMMAND_ARGS_TYPE; [PROCESS_EXECUTABLE_NAME]?: PROCESS_EXECUTABLE_NAME_TYPE; [PROCESS_PID]?: PROCESS_PID_TYPE; [PROCESS_RUNTIME_DESCRIPTION]?: PROCESS_RUNTIME_DESCRIPTION_TYPE; diff --git a/model/attributes/process/process__command_args.json b/model/attributes/process/process__command_args.json new file mode 100644 index 00000000..ade19a4b --- /dev/null +++ b/model/attributes/process/process__command_args.json @@ -0,0 +1,18 @@ +{ + "key": "process.command_args", + "brief": "All the command arguments (including the command/executable itself) as received by the process. ", + "type": "string[]", + "pii": { + "key": "maybe" + }, + "is_in_otel": true, + "example": ["cmd/otecol", "--config=config.yaml"], + "sdks": ["python"], + "changelog": [ + { + "version": "next", + "prs": [327], + "description": "Added process.command_args attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 7d5d11bc..9b0b433b 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4735,6 +4735,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "HomeScreen" """ + # Path: model/attributes/process/process__command_args.json + PROCESS_COMMAND_ARGS: Literal["process.command_args"] = "process.command_args" + """All the command arguments (including the command/executable itself) as received by the process. + + Type: List[str] + Contains PII: maybe + Defined in OTEL: Yes + Example: ["cmd/otecol","--config=config.yaml"] + """ + # Path: model/attributes/process/process__executable__name.json PROCESS_EXECUTABLE_NAME: Literal["process.executable.name"] = ( "process.executable.name" @@ -11640,6 +11650,21 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.0.0"), ], ), + "process.command_args": AttributeMetadata( + brief="All the command arguments (including the command/executable itself) as received by the process.", + type=AttributeType.STRING_ARRAY, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=True, + example=["cmd/otecol", "--config=config.yaml"], + sdks=["python"], + changelog=[ + ChangelogEntry( + version="next", + prs=[327], + description="Added process.command_args attribute", + ), + ], + ), "process.executable.name": AttributeMetadata( brief="The name of the executable that started the process.", type=AttributeType.STRING, @@ -13782,6 +13807,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "performance.activationStart": float, "performance.timeOrigin": float, "previous_route": str, + "process.command_args": List[str], "process.executable.name": str, "process.pid": int, "process.runtime.description": str, From 79a22fa437cb77f04f98a613baa4d892dfd209af Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Tue, 21 Apr 2026 12:49:49 +0200 Subject: [PATCH 2/2] fix whitespace --- javascript/sentry-conventions/src/attributes.ts | 4 ++-- model/attributes/process/process__command_args.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 845c640f..8a5f597a 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -8379,7 +8379,7 @@ export type PREVIOUS_ROUTE_TYPE = string; // Path: model/attributes/process/process__command_args.json /** - * All the command arguments (including the command/executable itself) as received by the process. `process.command_args` + * All the command arguments (including the command/executable itself) as received by the process. `process.command_args` * * Attribute Value Type: `Array` {@link PROCESS_COMMAND_ARGS_TYPE} * @@ -17766,7 +17766,7 @@ export const ATTRIBUTE_METADATA: Record = { changelog: [{ version: '0.1.0', prs: [74] }, { version: '0.0.0' }], }, [PROCESS_COMMAND_ARGS]: { - brief: 'All the command arguments (including the command/executable itself) as received by the process. ', + brief: 'All the command arguments (including the command/executable itself) as received by the process.', type: 'string[]', pii: { isPii: 'maybe', diff --git a/model/attributes/process/process__command_args.json b/model/attributes/process/process__command_args.json index ade19a4b..604a344a 100644 --- a/model/attributes/process/process__command_args.json +++ b/model/attributes/process/process__command_args.json @@ -1,6 +1,6 @@ { "key": "process.command_args", - "brief": "All the command arguments (including the command/executable itself) as received by the process. ", + "brief": "All the command arguments (including the command/executable itself) as received by the process.", "type": "string[]", "pii": { "key": "maybe"