Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 56 additions & 1 deletion javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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

/**
Expand Down Expand Up @@ -15600,6 +15626,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
'session.id': 'string',
stall_percentage: 'double',
stall_total_time: 'double',
'starlette.middleware_name': 'string',
'state.type': 'string',
'thread.id': 'integer',
'thread.name': 'string',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -22347,7 +22375,11 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
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.',
Expand Down Expand Up @@ -24391,6 +24423,28 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
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',
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions model/attributes/middleware/middleware__name.json
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
23 changes: 23 additions & 0 deletions model/attributes/starlette/starlette__middleware_name.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
43 changes: 43 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -5732,6 +5733,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Apply Scrubbing: manual
Defined in OTEL: No
Visibility: public
Aliases: starlette.middleware_name
Example: "AuthenticationMiddleware"
"""

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading