diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 041ac192..24cbd100 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -9649,6 +9649,8 @@ export type METHOD_TYPE = string; * Attribute defined in OTEL: No * Visibility: public * + * Aliases: {@link STARLETTE_MIDDLEWARE_NAME} `starlette.middleware_name` + * * @example "AuthenticationMiddleware" */ export const MIDDLEWARE_NAME = 'middleware.name'; @@ -13148,6 +13150,30 @@ export const STALL_TOTAL_TIME = 'stall_total_time'; */ export type STALL_TOTAL_TIME_TYPE = number; +// Path: model/attributes/starlette/starlette__middleware_name.json + +/** + * The name of the Starlette middleware. `starlette.middleware_name` + * + * Attribute Value Type: `string` {@link STARLETTE_MIDDLEWARE_NAME_TYPE} + * + * Apply Scrubbing: manual + * + * Attribute defined in OTEL: No + * Visibility: public + * + * Aliases: {@link MIDDLEWARE_NAME} `middleware.name` + * + * @deprecated Use {@link MIDDLEWARE_NAME} (middleware.name) instead - This attribute is being deprecated in favor of middleware.name, which is the framework-agnostic replacement. + * @example "AuthenticationMiddleware" + */ +export const STARLETTE_MIDDLEWARE_NAME = 'starlette.middleware_name'; + +/** + * Type for {@link STARLETTE_MIDDLEWARE_NAME} starlette.middleware_name + */ +export type STARLETTE_MIDDLEWARE_NAME_TYPE = string; + // Path: model/attributes/state/state__type.json /** @@ -15600,6 +15626,7 @@ export const ATTRIBUTE_TYPE: Record = { 'session.id': 'string', stall_percentage: 'double', stall_total_time: 'double', + 'starlette.middleware_name': 'string', 'state.type': 'string', 'thread.id': 'integer', 'thread.name': 'string', @@ -16282,6 +16309,7 @@ export type AttributeName = | typeof SESSION_ID | typeof STALL_PERCENTAGE | typeof STALL_TOTAL_TIME + | typeof STARLETTE_MIDDLEWARE_NAME | typeof STATE_TYPE | typeof THREAD_ID | typeof THREAD_NAME @@ -22347,7 +22375,11 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: false, visibility: 'public', example: 'AuthenticationMiddleware', - changelog: [{ version: '0.6.0', prs: [336], description: 'Added middleware.name attribute' }], + aliases: ['starlette.middleware_name'], + changelog: [ + { version: 'next', description: 'Added starlette.middleware_name as an alias' }, + { version: '0.6.0', prs: [336], description: 'Added middleware.name attribute' }, + ], }, 'navigation.type': { brief: 'The type of navigation done by a client-side router.', @@ -24391,6 +24423,28 @@ export const ATTRIBUTE_METADATA: Record = { visibility: 'public', changelog: [{ version: '0.7.0', prs: [362], description: 'Added stall_total_time attribute' }], }, + 'starlette.middleware_name': { + brief: 'The name of the Starlette middleware.', + type: 'string', + applyScrubbing: { + key: 'manual', + }, + isInOtel: false, + visibility: 'public', + example: 'AuthenticationMiddleware', + deprecation: { + replacement: 'middleware.name', + reason: + 'This attribute is being deprecated in favor of middleware.name, which is the framework-agnostic replacement.', + }, + aliases: ['middleware.name'], + changelog: [ + { + version: 'next', + description: 'Added starlette.middleware_name attribute, deprecated in favor of middleware.name', + }, + ], + }, 'state.type': { brief: 'The type of state management library', type: 'string', @@ -25992,6 +26046,7 @@ export type Attributes = { [SESSION_ID]?: SESSION_ID_TYPE; [STALL_PERCENTAGE]?: STALL_PERCENTAGE_TYPE; [STALL_TOTAL_TIME]?: STALL_TOTAL_TIME_TYPE; + [STARLETTE_MIDDLEWARE_NAME]?: STARLETTE_MIDDLEWARE_NAME_TYPE; [STATE_TYPE]?: STATE_TYPE_TYPE; [THREAD_ID]?: THREAD_ID_TYPE; [THREAD_NAME]?: THREAD_NAME_TYPE; diff --git a/model/attributes/middleware/middleware__name.json b/model/attributes/middleware/middleware__name.json index 3a609a86..a246e023 100644 --- a/model/attributes/middleware/middleware__name.json +++ b/model/attributes/middleware/middleware__name.json @@ -7,8 +7,13 @@ }, "is_in_otel": false, "example": "AuthenticationMiddleware", + "alias": ["starlette.middleware_name"], "visibility": "public", "changelog": [ + { + "version": "next", + "description": "Added starlette.middleware_name as an alias" + }, { "version": "0.6.0", "prs": [336], diff --git a/model/attributes/starlette/starlette__middleware_name.json b/model/attributes/starlette/starlette__middleware_name.json new file mode 100644 index 00000000..0bf07e82 --- /dev/null +++ b/model/attributes/starlette/starlette__middleware_name.json @@ -0,0 +1,23 @@ +{ + "key": "starlette.middleware_name", + "brief": "The name of the Starlette middleware.", + "type": "string", + "apply_scrubbing": { + "key": "manual" + }, + "is_in_otel": false, + "example": "AuthenticationMiddleware", + "alias": ["middleware.name"], + "deprecation": { + "_status": "backfill", + "replacement": "middleware.name", + "reason": "This attribute is being deprecated in favor of middleware.name, which is the framework-agnostic replacement." + }, + "visibility": "public", + "changelog": [ + { + "version": "next", + "description": "Added starlette.middleware_name attribute, deprecated in favor of middleware.name" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 90122d51..b83c2e34 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -273,6 +273,7 @@ class _AttributeNamesMeta(type): "SENTRY_USER_ID", "SENTRY_USER_IP", "SENTRY_USER_USERNAME", + "STARLETTE_MIDDLEWARE_NAME", "TIME_TO_FULL_DISPLAY", "TIME_TO_INITIAL_DISPLAY", "TRANSACTION", @@ -5732,6 +5733,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Apply Scrubbing: manual Defined in OTEL: No Visibility: public + Aliases: starlette.middleware_name Example: "AuthenticationMiddleware" """ @@ -7648,6 +7650,21 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Visibility: public """ + # Path: model/attributes/starlette/starlette__middleware_name.json + STARLETTE_MIDDLEWARE_NAME: Literal["starlette.middleware_name"] = ( + "starlette.middleware_name" + ) + """The name of the Starlette middleware. + + Type: str + Apply Scrubbing: manual + Defined in OTEL: No + Visibility: public + Aliases: middleware.name + DEPRECATED: Use middleware.name instead - This attribute is being deprecated in favor of middleware.name, which is the framework-agnostic replacement. + Example: "AuthenticationMiddleware" + """ + # Path: model/attributes/state/state__type.json STATE_TYPE: Literal["state.type"] = "state.type" """The type of state management library @@ -15094,7 +15111,12 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): is_in_otel=False, visibility=Visibility.PUBLIC, example="AuthenticationMiddleware", + aliases=["starlette.middleware_name"], changelog=[ + ChangelogEntry( + version="next", + description="Added starlette.middleware_name as an alias", + ), ChangelogEntry( version="0.6.0", prs=[336], @@ -17193,6 +17215,26 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "starlette.middleware_name": AttributeMetadata( + brief="The name of the Starlette middleware.", + type=AttributeType.STRING, + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.MANUAL), + is_in_otel=False, + visibility=Visibility.PUBLIC, + example="AuthenticationMiddleware", + deprecation=DeprecationInfo( + replacement="middleware.name", + reason="This attribute is being deprecated in favor of middleware.name, which is the framework-agnostic replacement.", + status=DeprecationStatus.BACKFILL, + ), + aliases=["middleware.name"], + changelog=[ + ChangelogEntry( + version="next", + description="Added starlette.middleware_name attribute, deprecated in favor of middleware.name", + ), + ], + ), "state.type": AttributeMetadata( brief="The type of state management library", type=AttributeType.STRING, @@ -18840,6 +18882,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "session.id": str, "stall_percentage": float, "stall_total_time": float, + "starlette.middleware_name": str, "state.type": str, "thread.id": int, "thread.name": str,