From 474256046ab2fe2c0ba6448757c18fee7352e26f Mon Sep 17 00:00:00 2001 From: Pablo Deputter Date: Tue, 13 Oct 2026 16:27:12 +0200 Subject: [PATCH 1/2] feat(attributes): Add `aws.lambda.resource_mapping.id` attribute Add the OTel attribute `aws.lambda.resource_mapping.id`. An event source mapping (https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-lambda-eventsourcemapping.html) connects a source such as an SQS queue, a Kinesis or DynamoDB stream, or a Kafka topic to a Lambda function: Lambda reads the source and invokes the function with the records. Its UUID identifies that trigger configuration. --- .../sentry-conventions/src/attributes.ts | 38 +++++++++++++++++++ javascript/sentry-conventions/src/search.ts | 13 +++++++ .../aws__lambda__resource_mapping__id.json | 17 +++++++++ python/src/sentry_conventions/attributes.py | 30 +++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 model/attributes/aws/aws__lambda__resource_mapping__id.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 644461a6..b4fbc56e 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2862,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__resource_mapping__id.json + +/** + * The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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. `aws.lambda.resource_mapping.id` + * + * Attribute Value Type: `string` {@link AWS_LAMBDA_RESOURCE_MAPPING_ID_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: Yes + * Visibility: public + * + * @example "587ad24b-03b9-4413-8202-bbd56b36e5b7" + */ +export const AWS_LAMBDA_RESOURCE_MAPPING_ID = 'aws.lambda.resource_mapping.id'; + +/** + * Type for {@link AWS_LAMBDA_RESOURCE_MAPPING_ID} aws.lambda.resource_mapping.id + */ +export type AWS_LAMBDA_RESOURCE_MAPPING_ID_TYPE = string; + // Path: model/attributes/aws/aws__log__group__names.json /** @@ -20569,6 +20590,7 @@ export const ATTRIBUTE_TYPE: Record = { '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.log.group.names': 'string[]', 'aws.log.stream.names': 'string[]', 'aws.operation_name': 'string', @@ -21478,6 +21500,7 @@ export type AttributeName = | 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_LOG_GROUP_NAMES | typeof AWS_LOG_STREAM_NAMES | typeof AWS_OPERATION_NAME @@ -24354,6 +24377,20 @@ 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.resource_mapping.id': { + brief: + "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.", + type: 'string', + keys: ['aws.lambda.resource_mapping.id'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: true, + visibility: 'public', + example: '587ad24b-03b9-4413-8202-bbd56b36e5b7', + examples: ['587ad24b-03b9-4413-8202-bbd56b36e5b7'], + changelog: [{ version: 'next', description: 'Added aws.lambda.resource_mapping.id attribute' }], + }, 'aws.log.group.names': { brief: 'The name(s) of the AWS log group(s) an application is writing to.', type: 'string[]', @@ -37335,6 +37372,7 @@ export type Attributes = { [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_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 663e145e..065b22e0 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -788,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_RESOURCE_MAPPING_ID}. `aws.lambda.resource_mapping.id` + */ +export const SEARCH_AWS__LAMBDA__RESOURCE_MAPPING__ID = 'aws.lambda.resource_mapping.id'; + /** * Search name for {@link attributes.AWS_LOG_GROUP_NAMES}. `aws.log.group.names` */ @@ -5383,6 +5388,7 @@ export type AttributeSearchName = | 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__LOG__GROUP__NAMES | typeof SEARCH_AWS__LOG__STREAM__NAMES | typeof SEARCH_AWS__OPERATION_NAME @@ -7068,6 +7074,13 @@ 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.resource_mapping.id': { + canonicalName: 'aws.lambda.resource_mapping.id', + type: 'string', + brief: + "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.log.group.names': { canonicalName: 'aws.log.group.names', type: 'string[]', diff --git a/model/attributes/aws/aws__lambda__resource_mapping__id.json b/model/attributes/aws/aws__lambda__resource_mapping__id.json new file mode 100644 index 00000000..7d591941 --- /dev/null +++ b/model/attributes/aws/aws__lambda__resource_mapping__id.json @@ -0,0 +1,17 @@ +{ + "key": "aws.lambda.resource_mapping.id", + "brief": "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": true, + "examples": ["587ad24b-03b9-4413-8202-bbd56b36e5b7"], + "visibility": "public", + "changelog": [ + { + "version": "next", + "description": "Added aws.lambda.resource_mapping.id attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 6b1f9e86..e7da3304 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -2070,6 +2070,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 5000 """ + # Path: model/attributes/aws/aws__lambda__resource_mapping__id.json + AWS_LAMBDA_RESOURCE_MAPPING_ID: Literal["aws.lambda.resource_mapping.id"] = ( + "aws.lambda.resource_mapping.id" + ) + """The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: Yes + Visibility: public + Example: "587ad24b-03b9-4413-8202-bbd56b36e5b7" + """ + # 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. @@ -14493,6 +14506,22 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.lambda.resource_mapping.id": AttributeMetadata( + brief="The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.", + type=AttributeType.STRING, + keys=("aws.lambda.resource_mapping.id",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=True, + visibility=Visibility.PUBLIC, + example="587ad24b-03b9-4413-8202-bbd56b36e5b7", + examples=["587ad24b-03b9-4413-8202-bbd56b36e5b7"], + changelog=[ + ChangelogEntry( + version="next", + description="Added aws.lambda.resource_mapping.id attribute", + ), + ], + ), "aws.log.group.names": AttributeMetadata( brief="The name(s) of the AWS log group(s) an application is writing to.", type=AttributeType.STRING_ARRAY, @@ -29368,6 +29397,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "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.log.group.names": List[str], "aws.log.stream.names": List[str], "aws.operation_name": str, From 8fbad629724c72bd06985df2aacec8c6aeb6b659 Mon Sep 17 00:00:00 2001 From: Pablo Deputter Date: Tue, 13 Oct 2026 16:31:58 +0200 Subject: [PATCH 2/2] fix OTel typos >:( --- javascript/sentry-conventions/src/attributes.ts | 4 ++-- javascript/sentry-conventions/src/search.ts | 2 +- model/attributes/aws/aws__lambda__resource_mapping__id.json | 2 +- python/src/sentry_conventions/attributes.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index b4fbc56e..8560febc 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2865,7 +2865,7 @@ export type AWS_LAMBDA_REMAINING_TIME_IN_MILLIS_TYPE = number; // Path: model/attributes/aws/aws__lambda__resource_mapping__id.json /** - * The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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. `aws.lambda.resource_mapping.id` + * 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. `aws.lambda.resource_mapping.id` * * Attribute Value Type: `string` {@link AWS_LAMBDA_RESOURCE_MAPPING_ID_TYPE} * @@ -24379,7 +24379,7 @@ export const ATTRIBUTE_METADATA: Record = { }, 'aws.lambda.resource_mapping.id': { brief: - "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.", + "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.", type: 'string', keys: ['aws.lambda.resource_mapping.id'], applyScrubbing: { diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 065b22e0..fa939109 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -7078,7 +7078,7 @@ export const ATTRIBUTE_SEARCH_METADATA: Record canonicalName: 'aws.lambda.resource_mapping.id', type: 'string', brief: - "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.", + "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.log.group.names': { diff --git a/model/attributes/aws/aws__lambda__resource_mapping__id.json b/model/attributes/aws/aws__lambda__resource_mapping__id.json index 7d591941..4c0d8ee6 100644 --- a/model/attributes/aws/aws__lambda__resource_mapping__id.json +++ b/model/attributes/aws/aws__lambda__resource_mapping__id.json @@ -1,6 +1,6 @@ { "key": "aws.lambda.resource_mapping.id", - "brief": "The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.", + "brief": "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.", "type": "string", "apply_scrubbing": { "key": "manual" diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index e7da3304..b5dfe6f2 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -2074,7 +2074,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): AWS_LAMBDA_RESOURCE_MAPPING_ID: Literal["aws.lambda.resource_mapping.id"] = ( "aws.lambda.resource_mapping.id" ) - """The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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. + """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. Type: str Apply Scrubbing: manual @@ -14507,7 +14507,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ], ), "aws.lambda.resource_mapping.id": AttributeMetadata( - brief="The UUID of the [AWS Lambda EvenSource Mapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html). An event source is mapped to a lambda function. It's 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.", + brief="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.", type=AttributeType.STRING, keys=("aws.lambda.resource_mapping.id",), apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL),