From 55ff7a74afcdb9ea5e8a635292aa80f5eac84ae4 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 92097737..5b56dfdf 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 @@ -3215,6 +3236,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 /** @@ -3278,6 +3321,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 /** @@ -3320,6 +3384,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 /** @@ -7241,7 +7326,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" */ @@ -21375,6 +21460,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', @@ -21396,11 +21482,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', @@ -22322,6 +22411,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 @@ -22342,11 +22432,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 @@ -25143,6 +25236,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', @@ -25506,6 +25615,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.', @@ -25545,6 +25670,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', @@ -25570,6 +25711,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', @@ -38927,6 +39082,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; @@ -38947,11 +39103,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 bbc2666c..c39a45f8 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 */ @@ -871,6 +876,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` */ @@ -886,6 +896,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` */ @@ -896,6 +911,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` * @@ -5566,6 +5586,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 @@ -5586,11 +5607,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 @@ -7263,6 +7287,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', @@ -7385,6 +7415,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', @@ -7405,6 +7441,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', @@ -7417,6 +7459,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 bf90259e..3bf7629a 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", @@ -2001,8 +2001,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 @@ -2251,6 +2264,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. @@ -2286,6 +2313,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" @@ -2312,6 +2352,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 @@ -14874,6 +14927,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, @@ -15307,6 +15378,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, @@ -15356,6 +15446,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, @@ -15391,6 +15500,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, @@ -30712,6 +30840,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, @@ -30732,11 +30861,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 fb49b2cc9a3bc5df1b16f9f3b4978065c1af0955 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 5b56dfdf..cae9f056 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 @@ -2904,6 +2883,27 @@ export const AWS_LAMBDA_RESOURCE_MAPPING_ID = 'aws.lambda.resource_mapping.id'; */ export type AWS_LAMBDA_RESOURCE_MAPPING_ID_TYPE = string; +// 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 /** @@ -7326,7 +7326,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" */ @@ -21460,13 +21460,13 @@ 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.resource_mapping.id': 'string', + 'aws.lambda.target_function.name': 'string', 'aws.log.group.names': 'string[]', 'aws.log.stream.names': 'string[]', 'aws.operation_name': 'string', @@ -22411,12 +22411,12 @@ 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_RESOURCE_MAPPING_ID + | typeof AWS_LAMBDA_TARGET_FUNCTION_NAME | typeof AWS_LOG_GROUP_NAMES | typeof AWS_LOG_STREAM_NAMES | typeof AWS_OPERATION_NAME @@ -25236,22 +25236,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', @@ -25362,6 +25346,22 @@ export const ATTRIBUTE_METADATA: Record = { examples: ['587ad24b-03b9-4413-8202-bbd56b36e5b7'], changelog: [{ version: '0.28.0', prs: [710], description: 'Added aws.lambda.resource_mapping.id 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[]', @@ -39082,12 +39082,12 @@ 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_RESOURCE_MAPPING_ID]?: AWS_LAMBDA_RESOURCE_MAPPING_ID_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 c39a45f8..a4d6bfa5 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 */ @@ -798,6 +793,11 @@ export const SEARCH_AWS__LAMBDA__REMAINING_TIME_IN_MILLIS = 'aws.lambda.remainin */ export const SEARCH_AWS__LAMBDA__RESOURCE_MAPPING__ID = 'aws.lambda.resource_mapping.id'; +/** + * 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` */ @@ -5586,13 +5586,13 @@ 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__RESOURCE_MAPPING__ID + | typeof SEARCH_AWS__LAMBDA__TARGET_FUNCTION__NAME | typeof SEARCH_AWS__LOG__GROUP__NAMES | typeof SEARCH_AWS__LOG__STREAM__NAMES | typeof SEARCH_AWS__OPERATION_NAME @@ -7287,12 +7287,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', @@ -7330,6 +7324,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record "The UUID of the [AWS Lambda EventSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. Its contents are read by Lambda and used to trigger a function. This isn't available in the lambda execution context or the lambda runtime environment. This is going to be populated by the AWS SDK for each language when that UUID is present. Some of these operations are Create/Delete/Get/List/Update EventSourceMapping.", deprecationChain: ['aws.lambda.resource_mapping.id'], }, + '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 3bf7629a..ce00b3df 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", @@ -2001,21 +2001,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 @@ -2097,6 +2084,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "587ad24b-03b9-4413-8202-bbd56b36e5b7" """ + # 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. @@ -14927,24 +14927,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, @@ -15084,6 +15066,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, @@ -30840,13 +30841,13 @@ 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.resource_mapping.id": str, + "aws.lambda.target_function.name": str, "aws.log.group.names": List[str], "aws.log.stream.names": List[str], "aws.operation_name": str,