From 2f60aee3a5fe44df3c9b9ce3b75ae63857931192 Mon Sep 17 00:00:00 2001 From: Pablo Deputter Date: Wed, 14 Oct 2026 13:56:04 +0200 Subject: [PATCH 1/2] feat(attributes): Add AWS Lambda, Step Functions and Secrets Manager name attributes Add `aws.lambda.function.name`, `aws.step_functions.state_machine.name`, `aws.step_functions.activity.name` and `aws.secretsmanager.secret.name`. --- .../sentry-conventions/src/attributes.ts | 169 +++++++++++++++++- javascript/sentry-conventions/src/search.ts | 50 +++++- .../aws/aws__lambda__function__name.json | 20 +++ .../aws__secretsmanager__secret__name.json | 20 +++ .../aws__step_functions__activity__name.json | 20 +++ ...__step_functions__state_machine__name.json | 18 ++ python/src/sentry_conventions/attributes.py | 136 +++++++++++++- 7 files changed, 425 insertions(+), 8 deletions(-) create mode 100644 model/attributes/aws/aws__lambda__function__name.json create mode 100644 model/attributes/aws/aws__secretsmanager__secret__name.json create mode 100644 model/attributes/aws/aws__step_functions__activity__name.json create mode 100644 model/attributes/aws/aws__step_functions__state_machine__name.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 644461a6..efe16616 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2746,12 +2746,33 @@ export const AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS = 'aws.lambda.execution_dur */ export type AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE = number; +// Path: model/attributes/aws/aws__lambda__function__name.json + +/** + * The name of the AWS Lambda function that an AWS SDK call acts on. `aws.lambda.function.name` + * + * Attribute Value Type: `string` {@link AWS_LAMBDA_FUNCTION_NAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "billing" + */ +export const AWS_LAMBDA_FUNCTION_NAME = 'aws.lambda.function.name'; + +/** + * Type for {@link AWS_LAMBDA_FUNCTION_NAME} aws.lambda.function.name + */ +export type AWS_LAMBDA_FUNCTION_NAME_TYPE = string; + // Path: model/attributes/aws/aws__lambda__function_name.json /** * The name of the Lambda function `aws.lambda.function_name` * - * Attribute Value Type: `string` {@link AWS_LAMBDA_FUNCTION_NAME_TYPE} + * Attribute Value Type: `string` {@link _AWS_LAMBDA_FUNCTION_NAME_TYPE} * * Apply Scrubbing: manual * @@ -2763,12 +2784,12 @@ export type AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE = number; * @deprecated Use {@link FAAS_NAME} (faas.name) instead - Use the OTel-aligned faas.name attribute instead * @example "my-function" */ -export const AWS_LAMBDA_FUNCTION_NAME = 'aws.lambda.function_name'; +export const _AWS_LAMBDA_FUNCTION_NAME = 'aws.lambda.function_name'; /** - * Type for {@link AWS_LAMBDA_FUNCTION_NAME} aws.lambda.function_name + * Type for {@link _AWS_LAMBDA_FUNCTION_NAME} aws.lambda.function_name */ -export type AWS_LAMBDA_FUNCTION_NAME_TYPE = string; +export type _AWS_LAMBDA_FUNCTION_NAME_TYPE = string; // Path: model/attributes/aws/aws__lambda__function_version.json @@ -3194,6 +3215,28 @@ export const AWS_SECRETSMANAGER_SECRET_ARN = 'aws.secretsmanager.secret.arn'; */ export type AWS_SECRETSMANAGER_SECRET_ARN_TYPE = string; +// Path: model/attributes/aws/aws__secretsmanager__secret__name.json + +/** + * The name of the secret stored in AWS Secrets Manager. `aws.secretsmanager.secret.name` + * + * Attribute Value Type: `string` {@link AWS_SECRETSMANAGER_SECRET_NAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "db-password" + * @example "prod/billing/api-key" + */ +export const AWS_SECRETSMANAGER_SECRET_NAME = 'aws.secretsmanager.secret.name'; + +/** + * Type for {@link AWS_SECRETSMANAGER_SECRET_NAME} aws.secretsmanager.secret.name + */ +export type AWS_SECRETSMANAGER_SECRET_NAME_TYPE = string; + // Path: model/attributes/aws/aws__sns__topic__arn.json /** @@ -3257,6 +3300,27 @@ export const AWS_STEP_FUNCTIONS_ACTIVITY_ARN = 'aws.step_functions.activity.arn' */ export type AWS_STEP_FUNCTIONS_ACTIVITY_ARN_TYPE = string; +// Path: model/attributes/aws/aws__step_functions__activity__name.json + +/** + * The name of the AWS Step Functions activity. `aws.step_functions.activity.name` + * + * Attribute Value Type: `string` {@link AWS_STEP_FUNCTIONS_ACTIVITY_NAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "resize-image" + */ +export const AWS_STEP_FUNCTIONS_ACTIVITY_NAME = 'aws.step_functions.activity.name'; + +/** + * Type for {@link AWS_STEP_FUNCTIONS_ACTIVITY_NAME} aws.step_functions.activity.name + */ +export type AWS_STEP_FUNCTIONS_ACTIVITY_NAME_TYPE = string; + // Path: model/attributes/aws/aws__step_functions__execution__arn.json /** @@ -3299,6 +3363,27 @@ export const AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN = 'aws.step_functions.state_ma */ export type AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN_TYPE = string; +// Path: model/attributes/aws/aws__step_functions__state_machine__name.json + +/** + * The name of the AWS Step Functions state machine. `aws.step_functions.state_machine.name` + * + * Attribute Value Type: `string` {@link AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "orders" + */ +export const AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME = 'aws.step_functions.state_machine.name'; + +/** + * Type for {@link AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME} aws.step_functions.state_machine.name + */ +export type AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME_TYPE = string; + // Path: model/attributes/blocked_main_thread.json /** @@ -7093,7 +7178,7 @@ export type FAAS_INVOKED_REGION_TYPE = string; * Attribute defined in OTEL: Yes * Visibility: public * - * Aliases: {@link AWS_LAMBDA_FUNCTION_NAME} `aws.lambda.function_name` + * Aliases: {@link _AWS_LAMBDA_FUNCTION_NAME} `aws.lambda.function_name` * * @example "my_function" */ @@ -20564,6 +20649,7 @@ export const ATTRIBUTE_TYPE: Record = { 'aws.kinesis.stream.name': 'string', 'aws.lambda.aws_request_id': 'string', 'aws.lambda.execution_duration_in_millis': 'double', + 'aws.lambda.function.name': 'string', 'aws.lambda.function_name': 'string', 'aws.lambda.function_version': 'string', 'aws.lambda.invoked_arn': 'string', @@ -20584,11 +20670,14 @@ export const ATTRIBUTE_TYPE: Record = { 'aws.s3.part_number': 'integer', 'aws.s3.upload_id': 'string', 'aws.secretsmanager.secret.arn': 'string', + 'aws.secretsmanager.secret.name': 'string', 'aws.sns.topic.arn': 'string', 'aws.sqs.queue.url': 'string', 'aws.step_functions.activity.arn': 'string', + 'aws.step_functions.activity.name': 'string', 'aws.step_functions.execution.arn': 'string', 'aws.step_functions.state_machine.arn': 'string', + 'aws.step_functions.state_machine.name': 'string', blocked_main_thread: 'boolean', 'browser.bfcache.frame': 'string', 'browser.bfcache.not_restored_reason_count': 'integer', @@ -21474,6 +21563,7 @@ export type AttributeName = | typeof AWS_LAMBDA_AWS_REQUEST_ID | typeof AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS | typeof AWS_LAMBDA_FUNCTION_NAME + | typeof _AWS_LAMBDA_FUNCTION_NAME | typeof AWS_LAMBDA_FUNCTION_VERSION | typeof AWS_LAMBDA_INVOKED_ARN | typeof AWS_LAMBDA_INVOKED_FUNCTION_ARN @@ -21493,11 +21583,14 @@ export type AttributeName = | typeof AWS_S3_PART_NUMBER | typeof AWS_S3_UPLOAD_ID | typeof AWS_SECRETSMANAGER_SECRET_ARN + | typeof AWS_SECRETSMANAGER_SECRET_NAME | typeof AWS_SNS_TOPIC_ARN | typeof AWS_SQS_QUEUE_URL | typeof AWS_STEP_FUNCTIONS_ACTIVITY_ARN + | typeof AWS_STEP_FUNCTIONS_ACTIVITY_NAME | typeof AWS_STEP_FUNCTIONS_EXECUTION_ARN | typeof AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN + | typeof AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME | typeof BLOCKED_MAIN_THREAD | typeof BROWSER_BFCACHE_FRAME | typeof BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT @@ -24258,6 +24351,22 @@ export const ATTRIBUTE_METADATA: Record = { { version: '0.7.0', prs: [369], description: 'Added aws.lambda.execution_duration_in_millis attribute' }, ], }, + 'aws.lambda.function.name': { + brief: 'The name of the AWS Lambda function that an AWS SDK call acts on.', + type: 'string', + keys: ['aws.lambda.function.name'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'billing', + examples: ['billing'], + changelog: [{ version: 'next', description: 'Added aws.lambda.function.name attribute' }], + additionalContext: [ + 'Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in.', + ], + }, 'aws.lambda.function_name': { brief: 'The name of the Lambda function', type: 'string', @@ -24597,6 +24706,22 @@ export const ATTRIBUTE_METADATA: Record = { example: 'arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters', changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.secretsmanager.secret.arn attribute' }], }, + 'aws.secretsmanager.secret.name': { + brief: 'The name of the secret stored in AWS Secrets Manager.', + type: 'string', + keys: ['aws.secretsmanager.secret.name'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'db-password', + examples: ['db-password', 'prod/billing/api-key'], + changelog: [{ version: 'next', description: 'Added aws.secretsmanager.secret.name attribute' }], + additionalContext: [ + "Without the hyphen and six random characters that Secrets Manager appends to the name in the secret's ARN (`db-password`, not `db-password-AbCdEf`).", + ], + }, 'aws.sns.topic.arn': { brief: 'The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical access point that acts as a communication channel.', @@ -24636,6 +24761,22 @@ export const ATTRIBUTE_METADATA: Record = { example: 'arn:aws:states:us-east-1:123456789012:activity:get-greeting', changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.step_functions.activity.arn attribute' }], }, + 'aws.step_functions.activity.name': { + brief: 'The name of the AWS Step Functions activity.', + type: 'string', + keys: ['aws.step_functions.activity.name'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'resize-image', + examples: ['resize-image'], + changelog: [{ version: 'next', description: 'Added aws.step_functions.activity.name attribute' }], + additionalContext: [ + 'The last part of the activity ARN (`arn:aws:states:us-east-1:123456789012:activity:resize-image`).', + ], + }, 'aws.step_functions.execution.arn': { brief: 'The ARN of the AWS Step Functions Execution.', type: 'string', @@ -24661,6 +24802,20 @@ export const ATTRIBUTE_METADATA: Record = { example: 'arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1', changelog: [{ version: '0.16.0', prs: [480], description: 'Added aws.step_functions.state_machine.arn attribute' }], }, + 'aws.step_functions.state_machine.name': { + brief: 'The name of the AWS Step Functions state machine.', + type: 'string', + keys: ['aws.step_functions.state_machine.name'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'orders', + examples: ['orders'], + changelog: [{ version: 'next', description: 'Added aws.step_functions.state_machine.name attribute' }], + additionalContext: ['Contains no version or alias qualifier (`orders`, not `orders:1` or `orders:prod`).'], + }, blocked_main_thread: { brief: 'Whether the main thread was blocked by the span.', type: 'boolean', @@ -37331,6 +37486,7 @@ export type Attributes = { [AWS_LAMBDA_AWS_REQUEST_ID]?: AWS_LAMBDA_AWS_REQUEST_ID_TYPE; [AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS]?: AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE; [AWS_LAMBDA_FUNCTION_NAME]?: AWS_LAMBDA_FUNCTION_NAME_TYPE; + [_AWS_LAMBDA_FUNCTION_NAME]?: _AWS_LAMBDA_FUNCTION_NAME_TYPE; [AWS_LAMBDA_FUNCTION_VERSION]?: AWS_LAMBDA_FUNCTION_VERSION_TYPE; [AWS_LAMBDA_INVOKED_ARN]?: AWS_LAMBDA_INVOKED_ARN_TYPE; [AWS_LAMBDA_INVOKED_FUNCTION_ARN]?: AWS_LAMBDA_INVOKED_FUNCTION_ARN_TYPE; @@ -37350,11 +37506,14 @@ export type Attributes = { [AWS_S3_PART_NUMBER]?: AWS_S3_PART_NUMBER_TYPE; [AWS_S3_UPLOAD_ID]?: AWS_S3_UPLOAD_ID_TYPE; [AWS_SECRETSMANAGER_SECRET_ARN]?: AWS_SECRETSMANAGER_SECRET_ARN_TYPE; + [AWS_SECRETSMANAGER_SECRET_NAME]?: AWS_SECRETSMANAGER_SECRET_NAME_TYPE; [AWS_SNS_TOPIC_ARN]?: AWS_SNS_TOPIC_ARN_TYPE; [AWS_SQS_QUEUE_URL]?: AWS_SQS_QUEUE_URL_TYPE; [AWS_STEP_FUNCTIONS_ACTIVITY_ARN]?: AWS_STEP_FUNCTIONS_ACTIVITY_ARN_TYPE; + [AWS_STEP_FUNCTIONS_ACTIVITY_NAME]?: AWS_STEP_FUNCTIONS_ACTIVITY_NAME_TYPE; [AWS_STEP_FUNCTIONS_EXECUTION_ARN]?: AWS_STEP_FUNCTIONS_EXECUTION_ARN_TYPE; [AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN]?: AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN_TYPE; + [AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME]?: AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME_TYPE; [BLOCKED_MAIN_THREAD]?: BLOCKED_MAIN_THREAD_TYPE; [BROWSER_BFCACHE_FRAME]?: BROWSER_BFCACHE_FRAME_TYPE; [BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT]?: BROWSER_BFCACHE_NOT_RESTORED_REASON_COUNT_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 663e145e..324c6f47 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -758,7 +758,12 @@ export const SEARCH_AWS__LAMBDA__AWS_REQUEST_ID = 'aws.lambda.aws_request_id'; export const SEARCH_AWS__LAMBDA__EXECUTION_DURATION_IN_MILLIS = 'aws.lambda.execution_duration_in_millis'; /** - * Search name for {@link attributes.AWS_LAMBDA_FUNCTION_NAME}. `aws.lambda.function_name` + * Search name for {@link attributes.AWS_LAMBDA_FUNCTION_NAME}. `aws.lambda.function.name` + */ +export const SEARCH_AWS__LAMBDA__FUNCTION__NAME = 'aws.lambda.function.name'; + +/** + * Search name for {@link attributes._AWS_LAMBDA_FUNCTION_NAME}. `aws.lambda.function_name` * * @deprecated Use {@link SEARCH_FAAS__NAME} (`faas.name`) instead */ @@ -866,6 +871,11 @@ export const SEARCH_AWS__S3__UPLOAD_ID = 'aws.s3.upload_id'; */ export const SEARCH_AWS__SECRETSMANAGER__SECRET__ARN = 'aws.secretsmanager.secret.arn'; +/** + * Search name for {@link attributes.AWS_SECRETSMANAGER_SECRET_NAME}. `aws.secretsmanager.secret.name` + */ +export const SEARCH_AWS__SECRETSMANAGER__SECRET__NAME = 'aws.secretsmanager.secret.name'; + /** * Search name for {@link attributes.AWS_SNS_TOPIC_ARN}. `aws.sns.topic.arn` */ @@ -881,6 +891,11 @@ export const SEARCH_AWS__SQS__QUEUE__URL = 'aws.sqs.queue.url'; */ export const SEARCH_AWS__STEP_FUNCTIONS__ACTIVITY__ARN = 'aws.step_functions.activity.arn'; +/** + * Search name for {@link attributes.AWS_STEP_FUNCTIONS_ACTIVITY_NAME}. `aws.step_functions.activity.name` + */ +export const SEARCH_AWS__STEP_FUNCTIONS__ACTIVITY__NAME = 'aws.step_functions.activity.name'; + /** * Search name for {@link attributes.AWS_STEP_FUNCTIONS_EXECUTION_ARN}. `aws.step_functions.execution.arn` */ @@ -891,6 +906,11 @@ export const SEARCH_AWS__STEP_FUNCTIONS__EXECUTION__ARN = 'aws.step_functions.ex */ export const SEARCH_AWS__STEP_FUNCTIONS__STATE_MACHINE__ARN = 'aws.step_functions.state_machine.arn'; +/** + * Search name for {@link attributes.AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME}. `aws.step_functions.state_machine.name` + */ +export const SEARCH_AWS__STEP_FUNCTIONS__STATE_MACHINE__NAME = 'aws.step_functions.state_machine.name'; + /** * Search name for {@link attributes.AWS_REGION}. `aws_region` * @@ -5378,6 +5398,7 @@ export type AttributeSearchName = | typeof SEARCH_AWS__KINESIS__STREAM_NAME | typeof SEARCH_AWS__LAMBDA__AWS_REQUEST_ID | typeof SEARCH_AWS__LAMBDA__EXECUTION_DURATION_IN_MILLIS + | typeof SEARCH_AWS__LAMBDA__FUNCTION__NAME | typeof SEARCH_AWS__LAMBDA__FUNCTION_NAME | typeof SEARCH_AWS__LAMBDA__FUNCTION_VERSION | typeof SEARCH_AWS__LAMBDA__INVOKED_ARN @@ -5397,11 +5418,14 @@ export type AttributeSearchName = | typeof SEARCH_AWS__S3__PART_NUMBER | typeof SEARCH_AWS__S3__UPLOAD_ID | typeof SEARCH_AWS__SECRETSMANAGER__SECRET__ARN + | typeof SEARCH_AWS__SECRETSMANAGER__SECRET__NAME | typeof SEARCH_AWS__SNS__TOPIC__ARN | typeof SEARCH_AWS__SQS__QUEUE__URL | typeof SEARCH_AWS__STEP_FUNCTIONS__ACTIVITY__ARN + | typeof SEARCH_AWS__STEP_FUNCTIONS__ACTIVITY__NAME | typeof SEARCH_AWS__STEP_FUNCTIONS__EXECUTION__ARN | typeof SEARCH_AWS__STEP_FUNCTIONS__STATE_MACHINE__ARN + | typeof SEARCH_AWS__STEP_FUNCTIONS__STATE_MACHINE__NAME | typeof SEARCH_AWS_REGION | typeof SEARCH_BLOCKED_MAIN_THREAD | typeof SEARCH_BROWSER__BFCACHE__FRAME @@ -7038,6 +7062,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The execution duration of the Lambda function invocation in milliseconds', deprecationChain: ['aws.lambda.execution_duration_in_millis'], }, + 'aws.lambda.function.name': { + canonicalName: 'aws.lambda.function.name', + type: 'string', + brief: 'The name of the AWS Lambda function that an AWS SDK call acts on.', + deprecationChain: ['aws.lambda.function.name'], + }, 'aws.lambda.function_name': { canonicalName: 'faas.name', type: 'string', @@ -7153,6 +7183,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The ARN of the Secret stored in Secrets Manager.', deprecationChain: ['aws.secretsmanager.secret.arn'], }, + 'aws.secretsmanager.secret.name': { + canonicalName: 'aws.secretsmanager.secret.name', + type: 'string', + brief: 'The name of the secret stored in AWS Secrets Manager.', + deprecationChain: ['aws.secretsmanager.secret.name'], + }, 'aws.sns.topic.arn': { canonicalName: 'aws.sns.topic.arn', type: 'string', @@ -7173,6 +7209,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The ARN of the AWS Step Functions Activity.', deprecationChain: ['aws.step_functions.activity.arn'], }, + 'aws.step_functions.activity.name': { + canonicalName: 'aws.step_functions.activity.name', + type: 'string', + brief: 'The name of the AWS Step Functions activity.', + deprecationChain: ['aws.step_functions.activity.name'], + }, 'aws.step_functions.execution.arn': { canonicalName: 'aws.step_functions.execution.arn', type: 'string', @@ -7185,6 +7227,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The ARN of the AWS Step Functions State Machine.', deprecationChain: ['aws.step_functions.state_machine.arn'], }, + 'aws.step_functions.state_machine.name': { + canonicalName: 'aws.step_functions.state_machine.name', + type: 'string', + brief: 'The name of the AWS Step Functions state machine.', + deprecationChain: ['aws.step_functions.state_machine.name'], + }, aws_region: { canonicalName: 'cloud.region', type: 'string', diff --git a/model/attributes/aws/aws__lambda__function__name.json b/model/attributes/aws/aws__lambda__function__name.json new file mode 100644 index 00000000..bb380cb9 --- /dev/null +++ b/model/attributes/aws/aws__lambda__function__name.json @@ -0,0 +1,20 @@ +{ + "key": "aws.lambda.function.name", + "brief": "The name of the AWS Lambda function that an AWS SDK call acts on.", + "additional_context": [ + "Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in." + ], + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["billing"], + "changelog": [ + { + "version": "next", + "description": "Added aws.lambda.function.name attribute" + } + ] +} diff --git a/model/attributes/aws/aws__secretsmanager__secret__name.json b/model/attributes/aws/aws__secretsmanager__secret__name.json new file mode 100644 index 00000000..6f6a4d7d --- /dev/null +++ b/model/attributes/aws/aws__secretsmanager__secret__name.json @@ -0,0 +1,20 @@ +{ + "key": "aws.secretsmanager.secret.name", + "brief": "The name of the secret stored in AWS Secrets Manager.", + "additional_context": [ + "Without the hyphen and six random characters that Secrets Manager appends to the name in the secret's ARN (`db-password`, not `db-password-AbCdEf`)." + ], + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["db-password", "prod/billing/api-key"], + "changelog": [ + { + "version": "next", + "description": "Added aws.secretsmanager.secret.name attribute" + } + ] +} diff --git a/model/attributes/aws/aws__step_functions__activity__name.json b/model/attributes/aws/aws__step_functions__activity__name.json new file mode 100644 index 00000000..d5fdbbb9 --- /dev/null +++ b/model/attributes/aws/aws__step_functions__activity__name.json @@ -0,0 +1,20 @@ +{ + "key": "aws.step_functions.activity.name", + "brief": "The name of the AWS Step Functions activity.", + "additional_context": [ + "The last part of the activity ARN (`arn:aws:states:us-east-1:123456789012:activity:resize-image`)." + ], + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["resize-image"], + "changelog": [ + { + "version": "next", + "description": "Added aws.step_functions.activity.name attribute" + } + ] +} diff --git a/model/attributes/aws/aws__step_functions__state_machine__name.json b/model/attributes/aws/aws__step_functions__state_machine__name.json new file mode 100644 index 00000000..9cdf5cb2 --- /dev/null +++ b/model/attributes/aws/aws__step_functions__state_machine__name.json @@ -0,0 +1,18 @@ +{ + "key": "aws.step_functions.state_machine.name", + "brief": "The name of the AWS Step Functions state machine.", + "additional_context": ["Contains no version or alias qualifier (`orders`, not `orders:1` or `orders:prod`)."], + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["orders"], + "changelog": [ + { + "version": "next", + "description": "Added aws.step_functions.state_machine.name attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 6b1f9e86..ae44cc9d 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -213,7 +213,7 @@ class _AttributeNamesMeta(type): "APP_START_WARM", "_AWS_KINESIS_STREAM_NAME", "AWS_LAMBDA_AWS_REQUEST_ID", - "AWS_LAMBDA_FUNCTION_NAME", + "_AWS_LAMBDA_FUNCTION_NAME", "AWS_LAMBDA_FUNCTION_VERSION", "AWS_LAMBDA_INVOKED_FUNCTION_ARN", "AWS_OPERATION_NAME", @@ -2000,8 +2000,21 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 1234.56 """ + # Path: model/attributes/aws/aws__lambda__function__name.json + AWS_LAMBDA_FUNCTION_NAME: Literal["aws.lambda.function.name"] = ( + "aws.lambda.function.name" + ) + """The name of the AWS Lambda function that an AWS SDK call acts on. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "billing" + """ + # Path: model/attributes/aws/aws__lambda__function_name.json - AWS_LAMBDA_FUNCTION_NAME: Literal["aws.lambda.function_name"] = ( + _AWS_LAMBDA_FUNCTION_NAME: Literal["aws.lambda.function_name"] = ( "aws.lambda.function_name" ) """The name of the Lambda function @@ -2237,6 +2250,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters" """ + # Path: model/attributes/aws/aws__secretsmanager__secret__name.json + AWS_SECRETSMANAGER_SECRET_NAME: Literal["aws.secretsmanager.secret.name"] = ( + "aws.secretsmanager.secret.name" + ) + """The name of the secret stored in AWS Secrets Manager. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "db-password" + Example: "prod/billing/api-key" + """ + # Path: model/attributes/aws/aws__sns__topic__arn.json AWS_SNS_TOPIC_ARN: Literal["aws.sns.topic.arn"] = "aws.sns.topic.arn" """The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical access point that acts as a communication channel. @@ -2272,6 +2299,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "arn:aws:states:us-east-1:123456789012:activity:get-greeting" """ + # Path: model/attributes/aws/aws__step_functions__activity__name.json + AWS_STEP_FUNCTIONS_ACTIVITY_NAME: Literal["aws.step_functions.activity.name"] = ( + "aws.step_functions.activity.name" + ) + """The name of the AWS Step Functions activity. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "resize-image" + """ + # Path: model/attributes/aws/aws__step_functions__execution__arn.json AWS_STEP_FUNCTIONS_EXECUTION_ARN: Literal["aws.step_functions.execution.arn"] = ( "aws.step_functions.execution.arn" @@ -2298,6 +2338,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1" """ + # Path: model/attributes/aws/aws__step_functions__state_machine__name.json + AWS_STEP_FUNCTIONS_STATE_MACHINE_NAME: Literal[ + "aws.step_functions.state_machine.name" + ] = "aws.step_functions.state_machine.name" + """The name of the AWS Step Functions state machine. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "orders" + """ + # Path: model/attributes/aws_region.json AWS_REGION: Literal["aws_region"] = "aws_region" """The geographical region the AWS resource is running @@ -14371,6 +14424,24 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.lambda.function.name": AttributeMetadata( + brief="The name of the AWS Lambda function that an AWS SDK call acts on.", + type=AttributeType.STRING, + keys=("aws.lambda.function.name",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="billing", + examples=["billing"], + changelog=[ + ChangelogEntry( + version="next", description="Added aws.lambda.function.name attribute" + ), + ], + additional_context=[ + "Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in." + ], + ), "aws.lambda.function_name": AttributeMetadata( brief="The name of the Lambda function", type=AttributeType.STRING, @@ -14768,6 +14839,25 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.secretsmanager.secret.name": AttributeMetadata( + brief="The name of the secret stored in AWS Secrets Manager.", + type=AttributeType.STRING, + keys=("aws.secretsmanager.secret.name",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="db-password", + examples=["db-password", "prod/billing/api-key"], + changelog=[ + ChangelogEntry( + version="next", + description="Added aws.secretsmanager.secret.name attribute", + ), + ], + additional_context=[ + "Without the hyphen and six random characters that Secrets Manager appends to the name in the secret's ARN (`db-password`, not `db-password-AbCdEf`)." + ], + ), "aws.sns.topic.arn": AttributeMetadata( brief="The ARN of the AWS SNS Topic. An Amazon SNS topic is a logical access point that acts as a communication channel.", type=AttributeType.STRING, @@ -14817,6 +14907,25 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.step_functions.activity.name": AttributeMetadata( + brief="The name of the AWS Step Functions activity.", + type=AttributeType.STRING, + keys=("aws.step_functions.activity.name",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="resize-image", + examples=["resize-image"], + changelog=[ + ChangelogEntry( + version="next", + description="Added aws.step_functions.activity.name attribute", + ), + ], + additional_context=[ + "The last part of the activity ARN (`arn:aws:states:us-east-1:123456789012:activity:resize-image`)." + ], + ), "aws.step_functions.execution.arn": AttributeMetadata( brief="The ARN of the AWS Step Functions Execution.", type=AttributeType.STRING, @@ -14852,6 +14961,25 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.step_functions.state_machine.name": AttributeMetadata( + brief="The name of the AWS Step Functions state machine.", + type=AttributeType.STRING, + keys=("aws.step_functions.state_machine.name",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="orders", + examples=["orders"], + changelog=[ + ChangelogEntry( + version="next", + description="Added aws.step_functions.state_machine.name attribute", + ), + ], + additional_context=[ + "Contains no version or alias qualifier (`orders`, not `orders:1` or `orders:prod`)." + ], + ), "aws_region": AttributeMetadata( brief="The geographical region the AWS resource is running", type=AttributeType.STRING, @@ -29363,6 +29491,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "aws.kinesis.stream_name": str, "aws.lambda.aws_request_id": str, "aws.lambda.execution_duration_in_millis": float, + "aws.lambda.function.name": str, "aws.lambda.function_name": str, "aws.lambda.function_version": str, "aws.lambda.invoked_arn": str, @@ -29382,11 +29511,14 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "aws.s3.part_number": int, "aws.s3.upload_id": str, "aws.secretsmanager.secret.arn": str, + "aws.secretsmanager.secret.name": str, "aws.sns.topic.arn": str, "aws.sqs.queue.url": str, "aws.step_functions.activity.arn": str, + "aws.step_functions.activity.name": str, "aws.step_functions.execution.arn": str, "aws.step_functions.state_machine.arn": str, + "aws.step_functions.state_machine.name": str, "aws_region": str, "blocked_main_thread": bool, "browser.bfcache.frame": str, From 57a2124012b2b83094e19abae7800ed30562472f Mon Sep 17 00:00:00 2001 From: Pablo Deputter Date: Fri, 16 Oct 2026 13:46:33 +0200 Subject: [PATCH 2/2] rename --- .../sentry-conventions/src/attributes.ts | 90 +++++++++---------- javascript/sentry-conventions/src/search.ts | 26 +++--- ...> aws__lambda__target_function__name.json} | 4 +- python/src/sentry_conventions/attributes.py | 69 +++++++------- 4 files changed, 95 insertions(+), 94 deletions(-) rename model/attributes/aws/{aws__lambda__function__name.json => aws__lambda__target_function__name.json} (82%) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index efe16616..32be64ad 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2746,33 +2746,12 @@ export const AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS = 'aws.lambda.execution_dur */ export type AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE = number; -// Path: model/attributes/aws/aws__lambda__function__name.json - -/** - * The name of the AWS Lambda function that an AWS SDK call acts on. `aws.lambda.function.name` - * - * Attribute Value Type: `string` {@link AWS_LAMBDA_FUNCTION_NAME_TYPE} - * - * Apply Scrubbing: manual - * - * Attribute defined in OTEL: No - * Visibility: public - * - * @example "billing" - */ -export const AWS_LAMBDA_FUNCTION_NAME = 'aws.lambda.function.name'; - -/** - * Type for {@link AWS_LAMBDA_FUNCTION_NAME} aws.lambda.function.name - */ -export type AWS_LAMBDA_FUNCTION_NAME_TYPE = string; - // Path: model/attributes/aws/aws__lambda__function_name.json /** * The name of the Lambda function `aws.lambda.function_name` * - * Attribute Value Type: `string` {@link _AWS_LAMBDA_FUNCTION_NAME_TYPE} + * Attribute Value Type: `string` {@link AWS_LAMBDA_FUNCTION_NAME_TYPE} * * Apply Scrubbing: manual * @@ -2784,12 +2763,12 @@ export type AWS_LAMBDA_FUNCTION_NAME_TYPE = string; * @deprecated Use {@link FAAS_NAME} (faas.name) instead - Use the OTel-aligned faas.name attribute instead * @example "my-function" */ -export const _AWS_LAMBDA_FUNCTION_NAME = 'aws.lambda.function_name'; +export const AWS_LAMBDA_FUNCTION_NAME = 'aws.lambda.function_name'; /** - * Type for {@link _AWS_LAMBDA_FUNCTION_NAME} aws.lambda.function_name + * Type for {@link AWS_LAMBDA_FUNCTION_NAME} aws.lambda.function_name */ -export type _AWS_LAMBDA_FUNCTION_NAME_TYPE = string; +export type AWS_LAMBDA_FUNCTION_NAME_TYPE = string; // Path: model/attributes/aws/aws__lambda__function_version.json @@ -2883,6 +2862,27 @@ export const AWS_LAMBDA_REMAINING_TIME_IN_MILLIS = 'aws.lambda.remaining_time_in */ export type AWS_LAMBDA_REMAINING_TIME_IN_MILLIS_TYPE = number; +// Path: model/attributes/aws/aws__lambda__target_function__name.json + +/** + * The name of the AWS Lambda function that an AWS SDK call acts on. `aws.lambda.target_function.name` + * + * Attribute Value Type: `string` {@link AWS_LAMBDA_TARGET_FUNCTION_NAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "billing" + */ +export const AWS_LAMBDA_TARGET_FUNCTION_NAME = 'aws.lambda.target_function.name'; + +/** + * Type for {@link AWS_LAMBDA_TARGET_FUNCTION_NAME} aws.lambda.target_function.name + */ +export type AWS_LAMBDA_TARGET_FUNCTION_NAME_TYPE = string; + // Path: model/attributes/aws/aws__log__group__names.json /** @@ -7178,7 +7178,7 @@ export type FAAS_INVOKED_REGION_TYPE = string; * Attribute defined in OTEL: Yes * Visibility: public * - * Aliases: {@link _AWS_LAMBDA_FUNCTION_NAME} `aws.lambda.function_name` + * Aliases: {@link AWS_LAMBDA_FUNCTION_NAME} `aws.lambda.function_name` * * @example "my_function" */ @@ -20649,12 +20649,12 @@ export const ATTRIBUTE_TYPE: Record = { 'aws.kinesis.stream.name': 'string', 'aws.lambda.aws_request_id': 'string', 'aws.lambda.execution_duration_in_millis': 'double', - 'aws.lambda.function.name': 'string', 'aws.lambda.function_name': 'string', 'aws.lambda.function_version': 'string', 'aws.lambda.invoked_arn': 'string', 'aws.lambda.invoked_function_arn': 'string', 'aws.lambda.remaining_time_in_millis': 'double', + 'aws.lambda.target_function.name': 'string', 'aws.log.group.names': 'string[]', 'aws.log.stream.names': 'string[]', 'aws.operation_name': 'string', @@ -21563,11 +21563,11 @@ export type AttributeName = | typeof AWS_LAMBDA_AWS_REQUEST_ID | typeof AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS | typeof AWS_LAMBDA_FUNCTION_NAME - | typeof _AWS_LAMBDA_FUNCTION_NAME | typeof AWS_LAMBDA_FUNCTION_VERSION | typeof AWS_LAMBDA_INVOKED_ARN | typeof AWS_LAMBDA_INVOKED_FUNCTION_ARN | typeof AWS_LAMBDA_REMAINING_TIME_IN_MILLIS + | typeof AWS_LAMBDA_TARGET_FUNCTION_NAME | typeof AWS_LOG_GROUP_NAMES | typeof AWS_LOG_STREAM_NAMES | typeof AWS_OPERATION_NAME @@ -24351,22 +24351,6 @@ export const ATTRIBUTE_METADATA: Record = { { version: '0.7.0', prs: [369], description: 'Added aws.lambda.execution_duration_in_millis attribute' }, ], }, - 'aws.lambda.function.name': { - brief: 'The name of the AWS Lambda function that an AWS SDK call acts on.', - type: 'string', - keys: ['aws.lambda.function.name'], - applyScrubbing: { - key: 'manual', - }, - isInOtel: false, - visibility: 'public', - example: 'billing', - examples: ['billing'], - changelog: [{ version: 'next', description: 'Added aws.lambda.function.name attribute' }], - additionalContext: [ - 'Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in.', - ], - }, 'aws.lambda.function_name': { brief: 'The name of the Lambda function', type: 'string', @@ -24463,6 +24447,22 @@ export const ATTRIBUTE_METADATA: Record = { example: 5000, changelog: [{ version: '0.7.0', prs: [369], description: 'Added aws.lambda.remaining_time_in_millis attribute' }], }, + 'aws.lambda.target_function.name': { + brief: 'The name of the AWS Lambda function that an AWS SDK call acts on.', + type: 'string', + keys: ['aws.lambda.target_function.name'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'billing', + examples: ['billing'], + changelog: [{ version: 'next', description: 'Added aws.lambda.target_function.name attribute' }], + additionalContext: [ + 'Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in.', + ], + }, 'aws.log.group.names': { brief: 'The name(s) of the AWS log group(s) an application is writing to.', type: 'string[]', @@ -37486,11 +37486,11 @@ export type Attributes = { [AWS_LAMBDA_AWS_REQUEST_ID]?: AWS_LAMBDA_AWS_REQUEST_ID_TYPE; [AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS]?: AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS_TYPE; [AWS_LAMBDA_FUNCTION_NAME]?: AWS_LAMBDA_FUNCTION_NAME_TYPE; - [_AWS_LAMBDA_FUNCTION_NAME]?: _AWS_LAMBDA_FUNCTION_NAME_TYPE; [AWS_LAMBDA_FUNCTION_VERSION]?: AWS_LAMBDA_FUNCTION_VERSION_TYPE; [AWS_LAMBDA_INVOKED_ARN]?: AWS_LAMBDA_INVOKED_ARN_TYPE; [AWS_LAMBDA_INVOKED_FUNCTION_ARN]?: AWS_LAMBDA_INVOKED_FUNCTION_ARN_TYPE; [AWS_LAMBDA_REMAINING_TIME_IN_MILLIS]?: AWS_LAMBDA_REMAINING_TIME_IN_MILLIS_TYPE; + [AWS_LAMBDA_TARGET_FUNCTION_NAME]?: AWS_LAMBDA_TARGET_FUNCTION_NAME_TYPE; [AWS_LOG_GROUP_NAMES]?: AWS_LOG_GROUP_NAMES_TYPE; [AWS_LOG_STREAM_NAMES]?: AWS_LOG_STREAM_NAMES_TYPE; [AWS_OPERATION_NAME]?: AWS_OPERATION_NAME_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 324c6f47..ab22cb5c 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -758,12 +758,7 @@ export const SEARCH_AWS__LAMBDA__AWS_REQUEST_ID = 'aws.lambda.aws_request_id'; export const SEARCH_AWS__LAMBDA__EXECUTION_DURATION_IN_MILLIS = 'aws.lambda.execution_duration_in_millis'; /** - * Search name for {@link attributes.AWS_LAMBDA_FUNCTION_NAME}. `aws.lambda.function.name` - */ -export const SEARCH_AWS__LAMBDA__FUNCTION__NAME = 'aws.lambda.function.name'; - -/** - * Search name for {@link attributes._AWS_LAMBDA_FUNCTION_NAME}. `aws.lambda.function_name` + * Search name for {@link attributes.AWS_LAMBDA_FUNCTION_NAME}. `aws.lambda.function_name` * * @deprecated Use {@link SEARCH_FAAS__NAME} (`faas.name`) instead */ @@ -793,6 +788,11 @@ export const SEARCH_AWS__LAMBDA__INVOKED_FUNCTION_ARN = 'aws.lambda.invoked_func */ export const SEARCH_AWS__LAMBDA__REMAINING_TIME_IN_MILLIS = 'aws.lambda.remaining_time_in_millis'; +/** + * Search name for {@link attributes.AWS_LAMBDA_TARGET_FUNCTION_NAME}. `aws.lambda.target_function.name` + */ +export const SEARCH_AWS__LAMBDA__TARGET_FUNCTION__NAME = 'aws.lambda.target_function.name'; + /** * Search name for {@link attributes.AWS_LOG_GROUP_NAMES}. `aws.log.group.names` */ @@ -5398,12 +5398,12 @@ export type AttributeSearchName = | typeof SEARCH_AWS__KINESIS__STREAM_NAME | typeof SEARCH_AWS__LAMBDA__AWS_REQUEST_ID | typeof SEARCH_AWS__LAMBDA__EXECUTION_DURATION_IN_MILLIS - | typeof SEARCH_AWS__LAMBDA__FUNCTION__NAME | typeof SEARCH_AWS__LAMBDA__FUNCTION_NAME | typeof SEARCH_AWS__LAMBDA__FUNCTION_VERSION | typeof SEARCH_AWS__LAMBDA__INVOKED_ARN | typeof SEARCH_AWS__LAMBDA__INVOKED_FUNCTION_ARN | typeof SEARCH_AWS__LAMBDA__REMAINING_TIME_IN_MILLIS + | typeof SEARCH_AWS__LAMBDA__TARGET_FUNCTION__NAME | typeof SEARCH_AWS__LOG__GROUP__NAMES | typeof SEARCH_AWS__LOG__STREAM__NAMES | typeof SEARCH_AWS__OPERATION_NAME @@ -7062,12 +7062,6 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The execution duration of the Lambda function invocation in milliseconds', deprecationChain: ['aws.lambda.execution_duration_in_millis'], }, - 'aws.lambda.function.name': { - canonicalName: 'aws.lambda.function.name', - type: 'string', - brief: 'The name of the AWS Lambda function that an AWS SDK call acts on.', - deprecationChain: ['aws.lambda.function.name'], - }, 'aws.lambda.function_name': { canonicalName: 'faas.name', type: 'string', @@ -7098,6 +7092,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The remaining time in milliseconds before the Lambda function times out', deprecationChain: ['aws.lambda.remaining_time_in_millis'], }, + 'aws.lambda.target_function.name': { + canonicalName: 'aws.lambda.target_function.name', + type: 'string', + brief: 'The name of the AWS Lambda function that an AWS SDK call acts on.', + deprecationChain: ['aws.lambda.target_function.name'], + }, 'aws.log.group.names': { canonicalName: 'aws.log.group.names', type: 'string[]', diff --git a/model/attributes/aws/aws__lambda__function__name.json b/model/attributes/aws/aws__lambda__target_function__name.json similarity index 82% rename from model/attributes/aws/aws__lambda__function__name.json rename to model/attributes/aws/aws__lambda__target_function__name.json index bb380cb9..07bfe9f6 100644 --- a/model/attributes/aws/aws__lambda__function__name.json +++ b/model/attributes/aws/aws__lambda__target_function__name.json @@ -1,5 +1,5 @@ { - "key": "aws.lambda.function.name", + "key": "aws.lambda.target_function.name", "brief": "The name of the AWS Lambda function that an AWS SDK call acts on.", "additional_context": [ "Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in." @@ -14,7 +14,7 @@ "changelog": [ { "version": "next", - "description": "Added aws.lambda.function.name attribute" + "description": "Added aws.lambda.target_function.name attribute" } ] } diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index ae44cc9d..ff9b550d 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -213,7 +213,7 @@ class _AttributeNamesMeta(type): "APP_START_WARM", "_AWS_KINESIS_STREAM_NAME", "AWS_LAMBDA_AWS_REQUEST_ID", - "_AWS_LAMBDA_FUNCTION_NAME", + "AWS_LAMBDA_FUNCTION_NAME", "AWS_LAMBDA_FUNCTION_VERSION", "AWS_LAMBDA_INVOKED_FUNCTION_ARN", "AWS_OPERATION_NAME", @@ -2000,21 +2000,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 1234.56 """ - # Path: model/attributes/aws/aws__lambda__function__name.json - AWS_LAMBDA_FUNCTION_NAME: Literal["aws.lambda.function.name"] = ( - "aws.lambda.function.name" - ) - """The name of the AWS Lambda function that an AWS SDK call acts on. - - Type: str - Apply Scrubbing: manual - Defined in OTEL: No - Visibility: public - Example: "billing" - """ - # Path: model/attributes/aws/aws__lambda__function_name.json - _AWS_LAMBDA_FUNCTION_NAME: Literal["aws.lambda.function_name"] = ( + AWS_LAMBDA_FUNCTION_NAME: Literal["aws.lambda.function_name"] = ( "aws.lambda.function_name" ) """The name of the Lambda function @@ -2083,6 +2070,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 5000 """ + # Path: model/attributes/aws/aws__lambda__target_function__name.json + AWS_LAMBDA_TARGET_FUNCTION_NAME: Literal["aws.lambda.target_function.name"] = ( + "aws.lambda.target_function.name" + ) + """The name of the AWS Lambda function that an AWS SDK call acts on. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "billing" + """ + # Path: model/attributes/aws/aws__log__group__names.json AWS_LOG_GROUP_NAMES: Literal["aws.log.group.names"] = "aws.log.group.names" """The name(s) of the AWS log group(s) an application is writing to. @@ -14424,24 +14424,6 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), - "aws.lambda.function.name": AttributeMetadata( - brief="The name of the AWS Lambda function that an AWS SDK call acts on.", - type=AttributeType.STRING, - keys=("aws.lambda.function.name",), - apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), - is_in_otel=False, - visibility=Visibility.PUBLIC, - example="billing", - examples=["billing"], - changelog=[ - ChangelogEntry( - version="next", description="Added aws.lambda.function.name attribute" - ), - ], - additional_context=[ - "Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in." - ], - ), "aws.lambda.function_name": AttributeMetadata( brief="The name of the Lambda function", type=AttributeType.STRING, @@ -14564,6 +14546,25 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.lambda.target_function.name": AttributeMetadata( + brief="The name of the AWS Lambda function that an AWS SDK call acts on.", + type=AttributeType.STRING, + keys=("aws.lambda.target_function.name",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="billing", + examples=["billing"], + changelog=[ + ChangelogEntry( + version="next", + description="Added aws.lambda.target_function.name attribute", + ), + ], + additional_context=[ + "Set on Lambda API calls that take a `FunctionName`, such as `GetFunction` or `UpdateFunctionCode`, without a version or alias qualifier (`billing`, not `billing:prod`). Different from `faas.name` which is the function the code runs in." + ], + ), "aws.log.group.names": AttributeMetadata( brief="The name(s) of the AWS log group(s) an application is writing to.", type=AttributeType.STRING_ARRAY, @@ -29491,12 +29492,12 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "aws.kinesis.stream_name": str, "aws.lambda.aws_request_id": str, "aws.lambda.execution_duration_in_millis": float, - "aws.lambda.function.name": str, "aws.lambda.function_name": str, "aws.lambda.function_version": str, "aws.lambda.invoked_arn": str, "aws.lambda.invoked_function_arn": str, "aws.lambda.remaining_time_in_millis": float, + "aws.lambda.target_function.name": str, "aws.log.group.names": List[str], "aws.log.stream.names": List[str], "aws.operation_name": str,