diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 644461a67..58f39029f 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2794,6 +2794,30 @@ export const AWS_LAMBDA_FUNCTION_VERSION = 'aws.lambda.function_version'; */ export type AWS_LAMBDA_FUNCTION_VERSION_TYPE = string; +// Path: model/attributes/aws/aws__lambda__initialization_type.json + +/** + * How AWS Lambda initialized the execution environment, as reported by AWS_LAMBDA_INITIALIZATION_TYPE. `aws.lambda.initialization_type` + * + * Attribute Value Type: `string` {@link AWS_LAMBDA_INITIALIZATION_TYPE_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "native-http" + * @example "on-demand" + * @example "provisioned-concurrency" + * @example "snap-start" + */ +export const AWS_LAMBDA_INITIALIZATION_TYPE = 'aws.lambda.initialization_type'; + +/** + * Type for {@link AWS_LAMBDA_INITIALIZATION_TYPE} aws.lambda.initialization_type + */ +export type AWS_LAMBDA_INITIALIZATION_TYPE_TYPE = string; + // Path: model/attributes/aws/aws__lambda__invoked_arn.json /** @@ -2862,6 +2886,28 @@ 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__web__endpoint_name.json + +/** + * The name of the AWS Lambda Web Function endpoint that received the request, as reported by the lambda-web-endpoint-name request header. `aws.lambda.web.endpoint_name` + * + * Attribute Value Type: `string` {@link AWS_LAMBDA_WEB_ENDPOINT_NAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * @example "prod" + * @example "canary" + */ +export const AWS_LAMBDA_WEB_ENDPOINT_NAME = 'aws.lambda.web.endpoint_name'; + +/** + * Type for {@link AWS_LAMBDA_WEB_ENDPOINT_NAME} aws.lambda.web.endpoint_name + */ +export type AWS_LAMBDA_WEB_ENDPOINT_NAME_TYPE = string; + // Path: model/attributes/aws/aws__log__group__names.json /** @@ -7081,6 +7127,28 @@ export const FAAS_INVOKED_REGION = 'faas.invoked_region'; */ export type FAAS_INVOKED_REGION_TYPE = string; +// Path: model/attributes/faas/faas__max_memory.json + +/** + * The amount of memory available to the serverless function, in bytes. `faas.max_memory` + * + * Attribute Value Type: `number` {@link FAAS_MAX_MEMORY_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: Yes + * Visibility: public + * + * @example 134217728 + * @example 1073741824 + */ +export const FAAS_MAX_MEMORY = 'faas.max_memory'; + +/** + * Type for {@link FAAS_MAX_MEMORY} faas.max_memory + */ +export type FAAS_MAX_MEMORY_TYPE = number; + // Path: model/attributes/faas/faas__name.json /** @@ -20566,9 +20634,11 @@ export const ATTRIBUTE_TYPE: Record = { 'aws.lambda.execution_duration_in_millis': 'double', 'aws.lambda.function_name': 'string', 'aws.lambda.function_version': 'string', + 'aws.lambda.initialization_type': 'string', 'aws.lambda.invoked_arn': 'string', 'aws.lambda.invoked_function_arn': 'string', 'aws.lambda.remaining_time_in_millis': 'double', + 'aws.lambda.web.endpoint_name': 'string', 'aws.log.group.names': 'string[]', 'aws.log.stream.names': 'string[]', 'aws.operation_name': 'string', @@ -20760,6 +20830,7 @@ export const ATTRIBUTE_TYPE: Record = { 'faas.invoked_name': 'string', 'faas.invoked_provider': 'string', 'faas.invoked_region': 'string', + 'faas.max_memory': 'integer', 'faas.name': 'string', 'faas.time': 'string', 'faas.trigger': 'string', @@ -21475,9 +21546,11 @@ export type AttributeName = | typeof AWS_LAMBDA_EXECUTION_DURATION_IN_MILLIS | typeof AWS_LAMBDA_FUNCTION_NAME | typeof AWS_LAMBDA_FUNCTION_VERSION + | typeof AWS_LAMBDA_INITIALIZATION_TYPE | typeof AWS_LAMBDA_INVOKED_ARN | typeof AWS_LAMBDA_INVOKED_FUNCTION_ARN | typeof AWS_LAMBDA_REMAINING_TIME_IN_MILLIS + | typeof AWS_LAMBDA_WEB_ENDPOINT_NAME | typeof AWS_LOG_GROUP_NAMES | typeof AWS_LOG_STREAM_NAMES | typeof AWS_OPERATION_NAME @@ -21669,6 +21742,7 @@ export type AttributeName = | typeof FAAS_INVOKED_NAME | typeof FAAS_INVOKED_PROVIDER | typeof FAAS_INVOKED_REGION + | typeof FAAS_MAX_MEMORY | typeof FAAS_NAME | typeof FAAS_TIME | typeof FAAS_TRIGGER @@ -24304,6 +24378,19 @@ export const ATTRIBUTE_METADATA: Record = { { version: '0.7.0', prs: [369], description: 'Added aws.lambda.function_version attribute' }, ], }, + 'aws.lambda.initialization_type': { + brief: 'How AWS Lambda initialized the execution environment, as reported by AWS_LAMBDA_INITIALIZATION_TYPE.', + type: 'string', + keys: ['aws.lambda.initialization_type'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'native-http', + examples: ['native-http', 'on-demand', 'provisioned-concurrency', 'snap-start'], + changelog: [{ version: 'next', description: 'Added aws.lambda.initialization_type attribute' }], + }, 'aws.lambda.invoked_arn': { brief: 'The full ARN of the Lambda function that was invoked', type: 'string', @@ -24354,6 +24441,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.web.endpoint_name': { + brief: + 'The name of the AWS Lambda Web Function endpoint that received the request, as reported by the lambda-web-endpoint-name request header.', + type: 'string', + keys: ['aws.lambda.web.endpoint_name'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'prod', + examples: ['prod', 'canary'], + changelog: [{ version: 'next', description: 'Added aws.lambda.web.endpoint_name attribute' }], + }, 'aws.log.group.names': { brief: 'The name(s) of the AWS log group(s) an application is writing to.', type: 'string[]', @@ -27191,6 +27292,22 @@ export const ATTRIBUTE_METADATA: Record = { example: 'eu-central-1', changelog: [{ version: '0.16.0', prs: [481], description: 'Added faas.invoked_region attribute' }], }, + 'faas.max_memory': { + brief: 'The amount of memory available to the serverless function, in bytes.', + type: 'integer', + keys: ['faas.max_memory'], + applyScrubbing: { + key: 'manual', + }, + isInOtel: true, + visibility: 'public', + example: 134217728, + examples: [134217728, 1073741824], + changelog: [{ version: 'next', description: 'Added faas.max_memory attribute' }], + additionalContext: [ + 'On AWS Lambda, multiply AWS_LAMBDA_FUNCTION_MEMORY_SIZE by 1,048,576 to convert the configured memory from MiB to bytes.', + ], + }, 'faas.name': { brief: 'The name of the serverless function', type: 'string', @@ -37332,9 +37449,11 @@ export type Attributes = { [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_VERSION]?: AWS_LAMBDA_FUNCTION_VERSION_TYPE; + [AWS_LAMBDA_INITIALIZATION_TYPE]?: AWS_LAMBDA_INITIALIZATION_TYPE_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_WEB_ENDPOINT_NAME]?: AWS_LAMBDA_WEB_ENDPOINT_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; @@ -37526,6 +37645,7 @@ export type Attributes = { [FAAS_INVOKED_NAME]?: FAAS_INVOKED_NAME_TYPE; [FAAS_INVOKED_PROVIDER]?: FAAS_INVOKED_PROVIDER_TYPE; [FAAS_INVOKED_REGION]?: FAAS_INVOKED_REGION_TYPE; + [FAAS_MAX_MEMORY]?: FAAS_MAX_MEMORY_TYPE; [FAAS_NAME]?: FAAS_NAME_TYPE; [FAAS_TIME]?: FAAS_TIME_TYPE; [FAAS_TRIGGER]?: FAAS_TRIGGER_TYPE; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 663e145e5..de20d2376 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -771,6 +771,11 @@ export const SEARCH_AWS__LAMBDA__FUNCTION_NAME = 'aws.lambda.function_name'; */ export const SEARCH_AWS__LAMBDA__FUNCTION_VERSION = 'aws.lambda.function_version'; +/** + * Search name for {@link attributes.AWS_LAMBDA_INITIALIZATION_TYPE}. `aws.lambda.initialization_type` + */ +export const SEARCH_AWS__LAMBDA__INITIALIZATION_TYPE = 'aws.lambda.initialization_type'; + /** * Search name for {@link attributes.AWS_LAMBDA_INVOKED_ARN}. `aws.lambda.invoked_arn` */ @@ -788,6 +793,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_WEB_ENDPOINT_NAME}. `aws.lambda.web.endpoint_name` + */ +export const SEARCH_AWS__LAMBDA__WEB__ENDPOINT_NAME = 'aws.lambda.web.endpoint_name'; + /** * Search name for {@link attributes.AWS_LOG_GROUP_NAMES}. `aws.log.group.names` */ @@ -1810,6 +1820,11 @@ export const SEARCH_FAAS__INVOKED_PROVIDER = 'faas.invoked_provider'; */ export const SEARCH_FAAS__INVOKED_REGION = 'faas.invoked_region'; +/** + * Search name for {@link attributes.FAAS_MAX_MEMORY}. `faas.max_memory` + */ +export const SEARCH_FAAS__MAX_MEMORY = 'faas.max_memory'; + /** * Search name for {@link attributes.FAAS_NAME}. `faas.name` */ @@ -5380,9 +5395,11 @@ export type AttributeSearchName = | typeof SEARCH_AWS__LAMBDA__EXECUTION_DURATION_IN_MILLIS | typeof SEARCH_AWS__LAMBDA__FUNCTION_NAME | typeof SEARCH_AWS__LAMBDA__FUNCTION_VERSION + | typeof SEARCH_AWS__LAMBDA__INITIALIZATION_TYPE | 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__WEB__ENDPOINT_NAME | typeof SEARCH_AWS__LOG__GROUP__NAMES | typeof SEARCH_AWS__LOG__STREAM__NAMES | typeof SEARCH_AWS__OPERATION_NAME @@ -5575,6 +5592,7 @@ export type AttributeSearchName = | typeof SEARCH_FAAS__INVOKED_NAME | typeof SEARCH_FAAS__INVOKED_PROVIDER | typeof SEARCH_FAAS__INVOKED_REGION + | typeof SEARCH_FAAS__MAX_MEMORY | typeof SEARCH_FAAS__NAME | typeof SEARCH_FAAS__TIME | typeof SEARCH_FAAS__TRIGGER @@ -7050,6 +7068,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The version of the Lambda function', deprecationChain: ['faas.version', 'aws.lambda.function_version'], }, + 'aws.lambda.initialization_type': { + canonicalName: 'aws.lambda.initialization_type', + type: 'string', + brief: 'How AWS Lambda initialized the execution environment, as reported by AWS_LAMBDA_INITIALIZATION_TYPE.', + deprecationChain: ['aws.lambda.initialization_type'], + }, 'aws.lambda.invoked_arn': { canonicalName: 'aws.lambda.invoked_arn', type: 'string', @@ -7068,6 +7092,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.web.endpoint_name': { + canonicalName: 'aws.lambda.web.endpoint_name', + type: 'string', + brief: + 'The name of the AWS Lambda Web Function endpoint that received the request, as reported by the lambda-web-endpoint-name request header.', + deprecationChain: ['aws.lambda.web.endpoint_name'], + }, 'aws.log.group.names': { canonicalName: 'aws.log.group.names', type: 'string[]', @@ -8263,6 +8294,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The cloud region of the invoked function.', deprecationChain: ['faas.invoked_region'], }, + 'faas.max_memory': { + canonicalName: 'faas.max_memory', + type: 'integer', + brief: 'The amount of memory available to the serverless function, in bytes.', + deprecationChain: ['faas.max_memory'], + }, 'faas.name': { canonicalName: 'faas.name', type: 'string', diff --git a/model/attributes/aws/aws__lambda__initialization_type.json b/model/attributes/aws/aws__lambda__initialization_type.json new file mode 100644 index 000000000..46e777d3f --- /dev/null +++ b/model/attributes/aws/aws__lambda__initialization_type.json @@ -0,0 +1,17 @@ +{ + "key": "aws.lambda.initialization_type", + "brief": "How AWS Lambda initialized the execution environment, as reported by AWS_LAMBDA_INITIALIZATION_TYPE.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["native-http", "on-demand", "provisioned-concurrency", "snap-start"], + "changelog": [ + { + "version": "next", + "description": "Added aws.lambda.initialization_type attribute" + } + ] +} diff --git a/model/attributes/aws/aws__lambda__web__endpoint_name.json b/model/attributes/aws/aws__lambda__web__endpoint_name.json new file mode 100644 index 000000000..ea4f9edf1 --- /dev/null +++ b/model/attributes/aws/aws__lambda__web__endpoint_name.json @@ -0,0 +1,17 @@ +{ + "key": "aws.lambda.web.endpoint_name", + "brief": "The name of the AWS Lambda Web Function endpoint that received the request, as reported by the lambda-web-endpoint-name request header.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "visibility": "public", + "examples": ["prod", "canary"], + "changelog": [ + { + "version": "next", + "description": "Added aws.lambda.web.endpoint_name attribute" + } + ] +} diff --git a/model/attributes/faas/faas__max_memory.json b/model/attributes/faas/faas__max_memory.json new file mode 100644 index 000000000..37cf1e7eb --- /dev/null +++ b/model/attributes/faas/faas__max_memory.json @@ -0,0 +1,20 @@ +{ + "key": "faas.max_memory", + "brief": "The amount of memory available to the serverless function, in bytes.", + "type": "integer", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": true, + "visibility": "public", + "examples": [134217728, 1073741824], + "additional_context": [ + "On AWS Lambda, multiply AWS_LAMBDA_FUNCTION_MEMORY_SIZE by 1,048,576 to convert the configured memory from MiB to bytes." + ], + "changelog": [ + { + "version": "next", + "description": "Added faas.max_memory attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 6b1f9e863..d867903e3 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -2030,6 +2030,22 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "$LATEST" """ + # Path: model/attributes/aws/aws__lambda__initialization_type.json + AWS_LAMBDA_INITIALIZATION_TYPE: Literal["aws.lambda.initialization_type"] = ( + "aws.lambda.initialization_type" + ) + """How AWS Lambda initialized the execution environment, as reported by AWS_LAMBDA_INITIALIZATION_TYPE. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "native-http" + Example: "on-demand" + Example: "provisioned-concurrency" + Example: "snap-start" + """ + # Path: model/attributes/aws/aws__lambda__invoked_arn.json AWS_LAMBDA_INVOKED_ARN: Literal["aws.lambda.invoked_arn"] = "aws.lambda.invoked_arn" """The full ARN of the Lambda function that was invoked @@ -2070,6 +2086,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 5000 """ + # Path: model/attributes/aws/aws__lambda__web__endpoint_name.json + AWS_LAMBDA_WEB_ENDPOINT_NAME: Literal["aws.lambda.web.endpoint_name"] = ( + "aws.lambda.web.endpoint_name" + ) + """The name of the AWS Lambda Web Function endpoint that received the request, as reported by the lambda-web-endpoint-name request header. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Example: "prod" + Example: "canary" + """ + # 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. @@ -4416,6 +4446,18 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "eu-central-1" """ + # Path: model/attributes/faas/faas__max_memory.json + FAAS_MAX_MEMORY: Literal["faas.max_memory"] = "faas.max_memory" + """The amount of memory available to the serverless function, in bytes. + + Type: int + Apply Scrubbing: manual + Defined in OTEL: Yes + Visibility: public + Example: 134217728 + Example: 1073741824 + """ + # Path: model/attributes/faas/faas__name.json FAAS_NAME: Literal["faas.name"] = "faas.name" """The name of the serverless function @@ -14431,6 +14473,22 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.lambda.initialization_type": AttributeMetadata( + brief="How AWS Lambda initialized the execution environment, as reported by AWS_LAMBDA_INITIALIZATION_TYPE.", + type=AttributeType.STRING, + keys=("aws.lambda.initialization_type",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="native-http", + examples=["native-http", "on-demand", "provisioned-concurrency", "snap-start"], + changelog=[ + ChangelogEntry( + version="next", + description="Added aws.lambda.initialization_type attribute", + ), + ], + ), "aws.lambda.invoked_arn": AttributeMetadata( brief="The full ARN of the Lambda function that was invoked", type=AttributeType.STRING, @@ -14493,6 +14551,22 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "aws.lambda.web.endpoint_name": AttributeMetadata( + brief="The name of the AWS Lambda Web Function endpoint that received the request, as reported by the lambda-web-endpoint-name request header.", + type=AttributeType.STRING, + keys=("aws.lambda.web.endpoint_name",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="prod", + examples=["prod", "canary"], + changelog=[ + ChangelogEntry( + version="next", + description="Added aws.lambda.web.endpoint_name 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, @@ -17849,6 +17923,24 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "faas.max_memory": AttributeMetadata( + brief="The amount of memory available to the serverless function, in bytes.", + type=AttributeType.INTEGER, + keys=("faas.max_memory",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=True, + visibility=Visibility.PUBLIC, + example=134217728, + examples=[134217728, 1073741824], + changelog=[ + ChangelogEntry( + version="next", description="Added faas.max_memory attribute" + ), + ], + additional_context=[ + "On AWS Lambda, multiply AWS_LAMBDA_FUNCTION_MEMORY_SIZE by 1,048,576 to convert the configured memory from MiB to bytes." + ], + ), "faas.name": AttributeMetadata( brief="The name of the serverless function", type=AttributeType.STRING, @@ -29365,9 +29457,11 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "aws.lambda.execution_duration_in_millis": float, "aws.lambda.function_name": str, "aws.lambda.function_version": str, + "aws.lambda.initialization_type": str, "aws.lambda.invoked_arn": str, "aws.lambda.invoked_function_arn": str, "aws.lambda.remaining_time_in_millis": float, + "aws.lambda.web.endpoint_name": str, "aws.log.group.names": List[str], "aws.log.stream.names": List[str], "aws.operation_name": str, @@ -29559,6 +29653,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "faas.invoked_name": str, "faas.invoked_provider": str, "faas.invoked_region": str, + "faas.max_memory": int, "faas.name": str, "faas.time": str, "faas.trigger": str,