diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index e334f7ba..09a236b5 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3134,6 +3134,8 @@ export type CLOUD_REGION_TYPE = string; * Attribute defined in OTEL: Yes * Visibility: public * + * Aliases: {@link FAAS_ID} `faas.id` + * * @example "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function" */ export const CLOUD_RESOURCE_ID = 'cloud.resource_id'; @@ -5082,6 +5084,30 @@ export const FAAS_EXECUTION = 'faas.execution'; */ export type FAAS_EXECUTION_TYPE = string; +// Path: model/attributes/faas/faas__id.json + +/** + * The unique ID of the single function that this runtime instance executes. `faas.id` + * + * Attribute Value Type: `string` {@link FAAS_ID_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * Aliases: {@link CLOUD_RESOURCE_ID} `cloud.resource_id` + * + * @deprecated Use {@link CLOUD_RESOURCE_ID} (cloud.resource_id) instead - This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0). + * @example "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function" + */ +export const FAAS_ID = 'faas.id'; + +/** + * Type for {@link FAAS_ID} faas.id + */ +export type FAAS_ID_TYPE = string; + // Path: model/attributes/faas/faas__identity.json /** @@ -15187,6 +15213,7 @@ export const ATTRIBUTE_TYPE: Record = { 'faas.duration_in_ms': 'integer', 'faas.entry_point': 'string', 'faas.execution': 'string', + 'faas.id': 'string', 'faas.identity': 'string', 'faas.invocation_id': 'string', 'faas.name': 'string', @@ -15867,6 +15894,7 @@ export type AttributeName = | typeof FAAS_DURATION_IN_MS | typeof FAAS_ENTRY_POINT | typeof FAAS_EXECUTION + | typeof FAAS_ID | typeof FAAS_IDENTITY | typeof FAAS_INVOCATION_ID | typeof FAAS_NAME @@ -18208,7 +18236,11 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: true, visibility: 'public', example: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', - changelog: [{ version: '0.11.1', prs: [414] }], + aliases: ['faas.id'], + changelog: [ + { version: 'next', prs: [475], description: 'Added faas.id as an alias' }, + { version: '0.11.1', prs: [414] }, + ], additionalContext: [ 'This can be an identifier for a resource in AWS, GCP, or Azure. There may be some overlap in values found here with other attributes. For instance, an AWS lambda ARN may be found here as well as in `aws.lambda.invoked_arn`. OTEL recommends setting them alongside each other.', ], @@ -19355,6 +19387,25 @@ export const ATTRIBUTE_METADATA: Record = { }, ], }, + 'faas.id': { + brief: 'The unique ID of the single function that this runtime instance executes.', + type: 'string', + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', + deprecation: { + replacement: 'cloud.resource_id', + reason: + 'This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0).', + }, + aliases: ['cloud.resource_id'], + changelog: [ + { version: 'next', prs: [475], description: 'Added faas.id attribute, deprecated in favor of cloud.resource_id' }, + ], + }, 'faas.identity': { brief: 'The Service Account (GCP), IAM Execution Role (AWS), or Managed Identity (Azure) used by the serverless function when interacting with other cloud services', @@ -25540,6 +25591,7 @@ export type Attributes = { [FAAS_DURATION_IN_MS]?: FAAS_DURATION_IN_MS_TYPE; [FAAS_ENTRY_POINT]?: FAAS_ENTRY_POINT_TYPE; [FAAS_EXECUTION]?: FAAS_EXECUTION_TYPE; + [FAAS_ID]?: FAAS_ID_TYPE; [FAAS_IDENTITY]?: FAAS_IDENTITY_TYPE; [FAAS_INVOCATION_ID]?: FAAS_INVOCATION_ID_TYPE; [FAAS_NAME]?: FAAS_NAME_TYPE; diff --git a/model/attributes/cloud/cloud__resource_id.json b/model/attributes/cloud/cloud__resource_id.json index c7406b8e..cf8d9419 100644 --- a/model/attributes/cloud/cloud__resource_id.json +++ b/model/attributes/cloud/cloud__resource_id.json @@ -10,8 +10,14 @@ "additional_context": [ "This can be an identifier for a resource in AWS, GCP, or Azure. There may be some overlap in values found here with other attributes. For instance, an AWS lambda ARN may be found here as well as in `aws.lambda.invoked_arn`. OTEL recommends setting them alongside each other." ], + "alias": ["faas.id"], "visibility": "public", "changelog": [ + { + "version": "next", + "prs": [475], + "description": "Added faas.id as an alias" + }, { "version": "0.11.1", "prs": [414] diff --git a/model/attributes/faas/faas__id.json b/model/attributes/faas/faas__id.json new file mode 100644 index 00000000..603ff545 --- /dev/null +++ b/model/attributes/faas/faas__id.json @@ -0,0 +1,24 @@ +{ + "key": "faas.id", + "brief": "The unique ID of the single function that this runtime instance executes.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "example": "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", + "alias": ["cloud.resource_id"], + "deprecation": { + "_status": "backfill", + "replacement": "cloud.resource_id", + "reason": "This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0)." + }, + "visibility": "public", + "changelog": [ + { + "version": "next", + "prs": [475], + "description": "Added faas.id attribute, deprecated in favor of cloud.resource_id" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 141ecb7d..7d5460e0 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -173,6 +173,7 @@ class _AttributeNamesMeta(type): "EFFECTIVECONNECTIONTYPE", "ENVIRONMENT", "FAAS_EXECUTION", + "FAAS_ID", "FCP", "FP", "FRAMES_DELAY", @@ -1842,6 +1843,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Apply Scrubbing: manual Defined in OTEL: Yes Visibility: public + Aliases: faas.id Example: "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function" """ @@ -3125,6 +3127,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "af9d5aa4-a685-4c5f-a22b-444f80b3cc28" """ + # Path: model/attributes/faas/faas__id.json + FAAS_ID: Literal["faas.id"] = "faas.id" + """The unique ID of the single function that this runtime instance executes. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Aliases: cloud.resource_id + DEPRECATED: Use cloud.resource_id instead - This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0). + Example: "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function" + """ + # Path: model/attributes/faas/faas__identity.json FAAS_IDENTITY: Literal["faas.identity"] = "faas.identity" """The Service Account (GCP), IAM Execution Role (AWS), or Managed Identity (Azure) used by the serverless function when interacting with other cloud services @@ -10432,7 +10447,11 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): is_in_otel=True, visibility=Visibility.PUBLIC, example="arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", + aliases=["faas.id"], changelog=[ + ChangelogEntry( + version="next", prs=[475], description="Added faas.id as an alias" + ), ChangelogEntry(version="0.11.1", prs=[414]), ], additional_context=[ @@ -11959,6 +11978,27 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "faas.id": AttributeMetadata( + brief="The unique ID of the single function that this runtime instance executes.", + type=AttributeType.STRING, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", + deprecation=DeprecationInfo( + replacement="cloud.resource_id", + reason="This attribute is being deprecated in favor of cloud.resource_id, which is the OTel-aligned replacement (renamed in OTel semantic conventions v1.19.0).", + status=DeprecationStatus.BACKFILL, + ), + aliases=["cloud.resource_id"], + changelog=[ + ChangelogEntry( + version="next", + prs=[475], + description="Added faas.id attribute, deprecated in favor of cloud.resource_id", + ), + ], + ), "faas.identity": AttributeMetadata( brief="The Service Account (GCP), IAM Execution Role (AWS), or Managed Identity (Azure) used by the serverless function when interacting with other cloud services", type=AttributeType.STRING, @@ -18410,6 +18450,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "faas.duration_in_ms": int, "faas.entry_point": str, "faas.execution": str, + "faas.id": str, "faas.identity": str, "faas.invocation_id": str, "faas.name": str,