From 5019efd848bdab7a86830bbf0e712f616b2f4c63 Mon Sep 17 00:00:00 2001 From: Michi Hoffmann Date: Mon, 11 May 2026 19:53:05 +0200 Subject: [PATCH] feat(attributes): Add `sentry.span.name` and `transaction.method` attributes Add `sentry.span.name` as a new attribute for span names, aliased with `sentry.segment.name`, `sentry.transaction`, and `transaction`. Add `transaction.method` as a deprecated attribute (backfill) pointing to `http.request.method`, with symmetric aliases across the method alias group. Co-Authored-By: Claude Opus 4.6 --- .../sentry-conventions/src/attributes.ts | 104 +++++++++++++++--- model/attributes/http/http__method.json | 2 +- .../http/http__request__method.json | 2 +- .../attributes/http/http__request_method.json | 2 +- model/attributes/method.json | 2 +- .../sentry/sentry__segment__name.json | 2 +- .../attributes/sentry/sentry__span__name.json | 18 +++ .../sentry/sentry__transaction.json | 2 +- model/attributes/transaction.json | 2 +- .../transaction/transaction__method.json | 22 ++++ python/src/sentry_conventions/attributes.py | 97 +++++++++++++--- shared/deprecated_attributes.json | 32 +++++- 12 files changed, 247 insertions(+), 40 deletions(-) create mode 100644 model/attributes/sentry/sentry__span__name.json create mode 100644 model/attributes/transaction/transaction__method.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index e74c1197..73b5020b 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -5345,7 +5345,7 @@ export type HTTP_HOST_TYPE = string; * * Attribute defined in OTEL: Yes * - * Aliases: {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link METHOD} `method` + * Aliases: {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link METHOD} `method`, {@link TRANSACTION_METHOD} `transaction.method` * * @deprecated Use {@link HTTP_REQUEST_METHOD} (http.request.method) instead * @example "GET" @@ -5530,7 +5530,7 @@ export type HTTP_REQUEST_HEADER_KEY_TYPE = Array; * * Attribute defined in OTEL: Yes * - * Aliases: {@link METHOD} `method`, {@link HTTP_METHOD} `http.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method` + * Aliases: {@link METHOD} `method`, {@link HTTP_METHOD} `http.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link TRANSACTION_METHOD} `transaction.method` * * @example "GET" */ @@ -5552,7 +5552,7 @@ export type HTTP_REQUEST_METHOD_TYPE = string; * * Attribute defined in OTEL: No * - * Aliases: {@link METHOD} `method`, {@link HTTP_METHOD} `http.method`, {@link HTTP_REQUEST_METHOD} `http.request.method` + * Aliases: {@link METHOD} `method`, {@link HTTP_METHOD} `http.method`, {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link TRANSACTION_METHOD} `transaction.method` * * @deprecated Use {@link HTTP_REQUEST_METHOD} (http.request.method) instead * @example "GET" @@ -7417,7 +7417,7 @@ export type MESSAGING_SYSTEM_TYPE = string; * * Attribute defined in OTEL: No * - * Aliases: {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link HTTP_METHOD} `http.method` + * Aliases: {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link HTTP_METHOD} `http.method`, {@link TRANSACTION_METHOD} `transaction.method` * * @deprecated Use {@link HTTP_REQUEST_METHOD} (http.request.method) instead * @example "GET" @@ -10024,7 +10024,7 @@ export type _SENTRY_SEGMENT_ID_TYPE = string; * * Attribute defined in OTEL: No * - * Aliases: {@link SENTRY_TRANSACTION} `sentry.transaction`, {@link TRANSACTION} `transaction` + * Aliases: {@link SENTRY_SPAN_NAME} `sentry.span.name`, {@link SENTRY_TRANSACTION} `sentry.transaction`, {@link TRANSACTION} `transaction` * * @example "GET /user" */ @@ -10076,6 +10076,28 @@ export const SENTRY_SOURCE = 'sentry.source'; */ export type SENTRY_SOURCE_TYPE = string; +// Path: model/attributes/sentry/sentry__span__name.json + +/** + * The name of a span `sentry.span.name` + * + * Attribute Value Type: `string` {@link SENTRY_SPAN_NAME_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link SENTRY_SEGMENT_NAME} `sentry.segment.name`, {@link SENTRY_TRANSACTION} `sentry.transaction`, {@link TRANSACTION} `transaction` + * + * @example "GET /user" + */ +export const SENTRY_SPAN_NAME = 'sentry.span.name'; + +/** + * Type for {@link SENTRY_SPAN_NAME} sentry.span.name + */ +export type SENTRY_SPAN_NAME_TYPE = string; + // Path: model/attributes/sentry/sentry__span__source.json /** @@ -10188,7 +10210,7 @@ export type SENTRY_TRACE_PARENT_SPAN_ID_TYPE = string; * * Attribute defined in OTEL: No * - * Aliases: {@link SENTRY_SEGMENT_NAME} `sentry.segment.name`, {@link TRANSACTION} `transaction` + * Aliases: {@link SENTRY_SPAN_NAME} `sentry.span.name`, {@link SENTRY_SEGMENT_NAME} `sentry.segment.name`, {@link TRANSACTION} `transaction` * * @deprecated Use {@link SENTRY_SEGMENT_NAME} (sentry.segment.name) instead - This attribute is being deprecated in favor of sentry.segment.name * @example "GET /" @@ -10403,7 +10425,7 @@ export type TIME_TO_INITIAL_DISPLAY_TYPE = number; * * Attribute defined in OTEL: No * - * Aliases: {@link SENTRY_SEGMENT_NAME} `sentry.segment.name`, {@link SENTRY_TRANSACTION} `sentry.transaction` + * Aliases: {@link SENTRY_SPAN_NAME} `sentry.span.name`, {@link SENTRY_SEGMENT_NAME} `sentry.segment.name`, {@link SENTRY_TRANSACTION} `sentry.transaction` * * @deprecated Use {@link SENTRY_SEGMENT_NAME} (sentry.segment.name) instead * @example "GET /" @@ -10415,6 +10437,29 @@ export const TRANSACTION = 'transaction'; */ export type TRANSACTION_TYPE = string; +// Path: model/attributes/transaction/transaction__method.json + +/** + * The HTTP method of a transaction `transaction.method` + * + * Attribute Value Type: `string` {@link TRANSACTION_METHOD_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * Aliases: {@link HTTP_REQUEST_METHOD} `http.request.method`, {@link HTTP_METHOD} `http.method`, {@link _HTTP_REQUEST_METHOD} `http.request_method`, {@link METHOD} `method` + * + * @deprecated Use {@link HTTP_REQUEST_METHOD} (http.request.method) instead + * @example "GET" + */ +export const TRANSACTION_METHOD = 'transaction.method'; + +/** + * Type for {@link TRANSACTION_METHOD} transaction.method + */ +export type TRANSACTION_METHOD_TYPE = string; + // Path: model/attributes/ttfb.json /** @@ -12434,6 +12479,7 @@ export const ATTRIBUTE_TYPE: Record = { [SENTRY_SEGMENT_NAME]: 'string', [SENTRY_SERVER_SAMPLE_RATE]: 'double', [SENTRY_SOURCE]: 'string', + [SENTRY_SPAN_NAME]: 'string', [SENTRY_SPAN_SOURCE]: 'string', [SENTRY_STATUS_CODE]: 'integer', [SENTRY_STATUS_MESSAGE]: 'string', @@ -12450,6 +12496,7 @@ export const ATTRIBUTE_TYPE: Record = { [TIME_TO_FULL_DISPLAY]: 'double', [TIME_TO_INITIAL_DISPLAY]: 'double', [TRANSACTION]: 'string', + [TRANSACTION_METHOD]: 'string', [TTFB]: 'double', [TTFB_REQUESTTIME]: 'double', [TYPE]: 'string', @@ -13004,6 +13051,7 @@ export type AttributeName = | typeof SENTRY_SEGMENT_NAME | typeof SENTRY_SERVER_SAMPLE_RATE | typeof SENTRY_SOURCE + | typeof SENTRY_SPAN_NAME | typeof SENTRY_SPAN_SOURCE | typeof SENTRY_STATUS_CODE | typeof SENTRY_STATUS_MESSAGE @@ -13020,6 +13068,7 @@ export type AttributeName = | typeof TIME_TO_FULL_DISPLAY | typeof TIME_TO_INITIAL_DISPLAY | typeof TRANSACTION + | typeof TRANSACTION_METHOD | typeof TTFB | typeof TTFB_REQUESTTIME | typeof TYPE @@ -16392,7 +16441,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'http.request.method', }, - aliases: [HTTP_REQUEST_METHOD, _HTTP_REQUEST_METHOD, METHOD], + aliases: [HTTP_REQUEST_METHOD, _HTTP_REQUEST_METHOD, METHOD, TRANSACTION_METHOD], changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], }, [HTTP_QUERY]: { @@ -16500,7 +16549,7 @@ export const ATTRIBUTE_METADATA: Record = { }, isInOtel: true, example: 'GET', - aliases: [METHOD, HTTP_METHOD, _HTTP_REQUEST_METHOD], + aliases: [METHOD, HTTP_METHOD, _HTTP_REQUEST_METHOD, TRANSACTION_METHOD], changelog: [{ version: '0.1.0', prs: [127] }, { version: '0.0.0' }], }, [_HTTP_REQUEST_METHOD]: { @@ -16514,7 +16563,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'http.request.method', }, - aliases: [METHOD, HTTP_METHOD, HTTP_REQUEST_METHOD], + aliases: [METHOD, HTTP_METHOD, HTTP_REQUEST_METHOD, TRANSACTION_METHOD], changelog: [{ version: '0.6.0', prs: [343], description: 'Added http.request_method attribute' }], }, [HTTP_REQUEST_REDIRECT_END]: { @@ -17591,7 +17640,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'http.request.method', }, - aliases: [HTTP_REQUEST_METHOD, _HTTP_REQUEST_METHOD, HTTP_METHOD], + aliases: [HTTP_REQUEST_METHOD, _HTTP_REQUEST_METHOD, HTTP_METHOD, TRANSACTION_METHOD], sdks: ['javascript-browser', 'javascript-node'], changelog: [{ version: '0.1.0', prs: [61, 127] }, { version: '0.0.0' }], }, @@ -19042,7 +19091,7 @@ export const ATTRIBUTE_METADATA: Record = { }, isInOtel: false, example: 'GET /user', - aliases: [SENTRY_TRANSACTION, TRANSACTION], + aliases: [SENTRY_SPAN_NAME, SENTRY_TRANSACTION, TRANSACTION], changelog: [ { version: '0.6.0', prs: [345], description: 'Added sentry.transaction and transaction aliases' }, { version: '0.1.0', prs: [104] }, @@ -19073,6 +19122,17 @@ export const ATTRIBUTE_METADATA: Record = { }, changelog: [{ version: '0.5.0' }], }, + [SENTRY_SPAN_NAME]: { + brief: 'The name of a span', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: 'GET /user', + aliases: [SENTRY_SEGMENT_NAME, SENTRY_TRANSACTION, TRANSACTION], + changelog: [{ version: 'next', prs: [361], description: 'Added sentry.span.name attribute' }], + }, [SENTRY_SPAN_SOURCE]: { brief: "The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.", @@ -19143,7 +19203,7 @@ export const ATTRIBUTE_METADATA: Record = { replacement: 'sentry.segment.name', reason: 'This attribute is being deprecated in favor of sentry.segment.name', }, - aliases: [SENTRY_SEGMENT_NAME, TRANSACTION], + aliases: [SENTRY_SPAN_NAME, SENTRY_SEGMENT_NAME, TRANSACTION], changelog: [ { version: '0.6.0', prs: [345], description: 'Deprecated sentry.transaction in favor of sentry.segment.name' }, { version: '0.0.0' }, @@ -19273,7 +19333,7 @@ export const ATTRIBUTE_METADATA: Record = { deprecation: { replacement: 'sentry.segment.name', }, - aliases: [SENTRY_SEGMENT_NAME, SENTRY_TRANSACTION], + aliases: [SENTRY_SPAN_NAME, SENTRY_SEGMENT_NAME, SENTRY_TRANSACTION], changelog: [ { version: '0.6.0', @@ -19284,6 +19344,20 @@ export const ATTRIBUTE_METADATA: Record = { { version: '0.0.0' }, ], }, + [TRANSACTION_METHOD]: { + brief: 'The HTTP method of a transaction', + type: 'string', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: 'GET', + deprecation: { + replacement: 'http.request.method', + }, + aliases: [HTTP_REQUEST_METHOD, HTTP_METHOD, _HTTP_REQUEST_METHOD, METHOD], + changelog: [{ version: 'next', prs: [361], description: 'Added transaction.method attribute' }], + }, [TTFB]: { brief: 'The value of the recorded Time To First Byte (TTFB) web vital in milliseconds', type: 'double', @@ -20550,6 +20624,7 @@ export type Attributes = { [SENTRY_SEGMENT_NAME]?: SENTRY_SEGMENT_NAME_TYPE; [SENTRY_SERVER_SAMPLE_RATE]?: SENTRY_SERVER_SAMPLE_RATE_TYPE; [SENTRY_SOURCE]?: SENTRY_SOURCE_TYPE; + [SENTRY_SPAN_NAME]?: SENTRY_SPAN_NAME_TYPE; [SENTRY_SPAN_SOURCE]?: SENTRY_SPAN_SOURCE_TYPE; [SENTRY_STATUS_CODE]?: SENTRY_STATUS_CODE_TYPE; [SENTRY_STATUS_MESSAGE]?: SENTRY_STATUS_MESSAGE_TYPE; @@ -20566,6 +20641,7 @@ export type Attributes = { [TIME_TO_FULL_DISPLAY]?: TIME_TO_FULL_DISPLAY_TYPE; [TIME_TO_INITIAL_DISPLAY]?: TIME_TO_INITIAL_DISPLAY_TYPE; [TRANSACTION]?: TRANSACTION_TYPE; + [TRANSACTION_METHOD]?: TRANSACTION_METHOD_TYPE; [TTFB]?: TTFB_TYPE; [TTFB_REQUESTTIME]?: TTFB_REQUESTTIME_TYPE; [TYPE]?: TYPE_TYPE; diff --git a/model/attributes/http/http__method.json b/model/attributes/http/http__method.json index a2769623..82d4d822 100644 --- a/model/attributes/http/http__method.json +++ b/model/attributes/http/http__method.json @@ -11,7 +11,7 @@ "_status": "backfill", "replacement": "http.request.method" }, - "alias": ["http.request.method", "http.request_method", "method"], + "alias": ["http.request.method", "http.request_method", "method", "transaction.method"], "changelog": [ { "version": "0.1.0", diff --git a/model/attributes/http/http__request__method.json b/model/attributes/http/http__request__method.json index 56c8e80f..eedf3308 100644 --- a/model/attributes/http/http__request__method.json +++ b/model/attributes/http/http__request__method.json @@ -7,7 +7,7 @@ }, "is_in_otel": true, "example": "GET", - "alias": ["method", "http.method", "http.request_method"], + "alias": ["method", "http.method", "http.request_method", "transaction.method"], "changelog": [ { "version": "0.1.0", diff --git a/model/attributes/http/http__request_method.json b/model/attributes/http/http__request_method.json index 5ee5ae39..1fec791d 100644 --- a/model/attributes/http/http__request_method.json +++ b/model/attributes/http/http__request_method.json @@ -11,7 +11,7 @@ "_status": "backfill", "replacement": "http.request.method" }, - "alias": ["method", "http.method", "http.request.method"], + "alias": ["method", "http.method", "http.request.method", "transaction.method"], "changelog": [ { "version": "0.6.0", diff --git a/model/attributes/method.json b/model/attributes/method.json index 3c7c54a8..ff215716 100644 --- a/model/attributes/method.json +++ b/model/attributes/method.json @@ -11,7 +11,7 @@ "_status": null, "replacement": "http.request.method" }, - "alias": ["http.request.method", "http.request_method", "http.method"], + "alias": ["http.request.method", "http.request_method", "http.method", "transaction.method"], "sdks": ["javascript-browser", "javascript-node"], "changelog": [ { diff --git a/model/attributes/sentry/sentry__segment__name.json b/model/attributes/sentry/sentry__segment__name.json index 3c800e53..7202615e 100644 --- a/model/attributes/sentry/sentry__segment__name.json +++ b/model/attributes/sentry/sentry__segment__name.json @@ -7,7 +7,7 @@ }, "is_in_otel": false, "example": "GET /user", - "alias": ["sentry.transaction", "transaction"], + "alias": ["sentry.span.name", "sentry.transaction", "transaction"], "changelog": [ { "version": "0.6.0", diff --git a/model/attributes/sentry/sentry__span__name.json b/model/attributes/sentry/sentry__span__name.json new file mode 100644 index 00000000..38dce610 --- /dev/null +++ b/model/attributes/sentry/sentry__span__name.json @@ -0,0 +1,18 @@ +{ + "key": "sentry.span.name", + "brief": "The name of a span", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "GET /user", + "alias": ["sentry.segment.name", "sentry.transaction", "transaction"], + "changelog": [ + { + "version": "next", + "prs": [361], + "description": "Added sentry.span.name attribute" + } + ] +} diff --git a/model/attributes/sentry/sentry__transaction.json b/model/attributes/sentry/sentry__transaction.json index dd11e23c..03e3e200 100644 --- a/model/attributes/sentry/sentry__transaction.json +++ b/model/attributes/sentry/sentry__transaction.json @@ -12,7 +12,7 @@ "replacement": "sentry.segment.name", "reason": "This attribute is being deprecated in favor of sentry.segment.name" }, - "alias": ["sentry.segment.name", "transaction"], + "alias": ["sentry.span.name", "sentry.segment.name", "transaction"], "changelog": [ { "version": "0.6.0", diff --git a/model/attributes/transaction.json b/model/attributes/transaction.json index bd93882e..fa1c787d 100644 --- a/model/attributes/transaction.json +++ b/model/attributes/transaction.json @@ -11,7 +11,7 @@ "_status": "backfill", "replacement": "sentry.segment.name" }, - "alias": ["sentry.segment.name", "sentry.transaction"], + "alias": ["sentry.span.name", "sentry.segment.name", "sentry.transaction"], "changelog": [ { "version": "0.6.0", diff --git a/model/attributes/transaction/transaction__method.json b/model/attributes/transaction/transaction__method.json new file mode 100644 index 00000000..d92cf39d --- /dev/null +++ b/model/attributes/transaction/transaction__method.json @@ -0,0 +1,22 @@ +{ + "key": "transaction.method", + "brief": "The HTTP method of a transaction", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "GET", + "deprecation": { + "_status": "backfill", + "replacement": "http.request.method" + }, + "alias": ["http.request.method", "http.method", "http.request_method", "method"], + "changelog": [ + { + "version": "next", + "prs": [361], + "description": "Added transaction.method attribute" + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 5563bd91..e972a71c 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -235,6 +235,7 @@ class _AttributeNamesMeta(type): "SENTRY_TRANSACTION", "TIME_TO_FULL_DISPLAY", "TIME_TO_INITIAL_DISPLAY", + "TRANSACTION_METHOD", "TRANSACTION", "TTFB_REQUESTTIME", "TTFB", @@ -3114,7 +3115,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: Yes - Aliases: http.request.method, http.request_method, method + Aliases: http.request.method, http.request_method, method, transaction.method DEPRECATED: Use http.request.method instead Example: "GET" """ @@ -3219,7 +3220,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: Yes - Aliases: method, http.method, http.request_method + Aliases: method, http.method, http.request_method, transaction.method Example: "GET" """ @@ -3338,7 +3339,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No - Aliases: method, http.method, http.request.method + Aliases: method, http.method, http.request.method, transaction.method DEPRECATED: Use http.request.method instead Example: "GET" """ @@ -4243,7 +4244,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No - Aliases: http.request.method, http.request_method, http.method + Aliases: http.request.method, http.request_method, http.method, transaction.method DEPRECATED: Use http.request.method instead Example: "GET" """ @@ -5607,7 +5608,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No - Aliases: sentry.transaction, transaction + Aliases: sentry.span.name, sentry.transaction, transaction Example: "GET /user" """ @@ -5646,6 +5647,17 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "route" """ + # Path: model/attributes/sentry/sentry__span__name.json + SENTRY_SPAN_NAME: Literal["sentry.span.name"] = "sentry.span.name" + """The name of a span + + Type: str + Contains PII: maybe + Defined in OTEL: No + Aliases: sentry.segment.name, sentry.transaction, transaction + Example: "GET /user" + """ + # Path: model/attributes/sentry/sentry__span__source.json SENTRY_SPAN_SOURCE: Literal["sentry.span.source"] = "sentry.span.source" """The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers. @@ -5708,7 +5720,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: false Defined in OTEL: No - Aliases: sentry.segment.name, transaction + Aliases: sentry.span.name, sentry.segment.name, transaction DEPRECATED: Use sentry.segment.name instead - This attribute is being deprecated in favor of sentry.segment.name Example: "GET /" """ @@ -5812,6 +5824,18 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 1234.56 """ + # Path: model/attributes/transaction/transaction__method.json + TRANSACTION_METHOD: Literal["transaction.method"] = "transaction.method" + """The HTTP method of a transaction + + Type: str + Contains PII: maybe + Defined in OTEL: No + Aliases: http.request.method, http.method, http.request_method, method + DEPRECATED: Use http.request.method instead + Example: "GET" + """ + # Path: model/attributes/transaction.json TRANSACTION: Literal["transaction"] = "transaction" """The sentry transaction (segment name). @@ -5819,7 +5843,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: No - Aliases: sentry.segment.name, sentry.transaction + Aliases: sentry.span.name, sentry.segment.name, sentry.transaction DEPRECATED: Use sentry.segment.name instead Example: "GET /" """ @@ -10121,7 +10145,12 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): deprecation=DeprecationInfo( replacement="http.request.method", status=DeprecationStatus.BACKFILL ), - aliases=["http.request.method", "http.request_method", "method"], + aliases=[ + "http.request.method", + "http.request_method", + "method", + "transaction.method", + ], changelog=[ ChangelogEntry(version="0.1.0", prs=[61, 127]), ChangelogEntry(version="0.0.0"), @@ -10237,7 +10266,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=True, example="GET", - aliases=["method", "http.method", "http.request_method"], + aliases=["method", "http.method", "http.request_method", "transaction.method"], changelog=[ ChangelogEntry(version="0.1.0", prs=[127]), ChangelogEntry(version="0.0.0"), @@ -10364,7 +10393,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): deprecation=DeprecationInfo( replacement="http.request.method", status=DeprecationStatus.BACKFILL ), - aliases=["method", "http.method", "http.request.method"], + aliases=["method", "http.method", "http.request.method", "transaction.method"], changelog=[ ChangelogEntry( version="0.6.0", @@ -11351,7 +11380,12 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): is_in_otel=False, example="GET", deprecation=DeprecationInfo(replacement="http.request.method"), - aliases=["http.request.method", "http.request_method", "http.method"], + aliases=[ + "http.request.method", + "http.request_method", + "http.method", + "transaction.method", + ], sdks=["javascript-browser", "javascript-node"], changelog=[ ChangelogEntry(version="0.1.0", prs=[61, 127]), @@ -12835,7 +12869,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): pii=PiiInfo(isPii=IsPii.MAYBE), is_in_otel=False, example="GET /user", - aliases=["sentry.transaction", "transaction"], + aliases=["sentry.span.name", "sentry.transaction", "transaction"], changelog=[ ChangelogEntry( version="0.6.0", @@ -12884,6 +12918,21 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.5.0"), ], ), + "sentry.span.name": AttributeMetadata( + brief="The name of a span", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example="GET /user", + aliases=["sentry.segment.name", "sentry.transaction", "transaction"], + changelog=[ + ChangelogEntry( + version="next", + prs=[361], + description="Added sentry.span.name attribute", + ), + ], + ), "sentry.span.source": AttributeMetadata( brief="The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. '`source`' describes a parametrized route, while `'url'` describes the full URL, potentially containing identifiers.", type=AttributeType.STRING, @@ -12952,7 +13001,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): reason="This attribute is being deprecated in favor of sentry.segment.name", status=DeprecationStatus.BACKFILL, ), - aliases=["sentry.segment.name", "transaction"], + aliases=["sentry.span.name", "sentry.segment.name", "transaction"], changelog=[ ChangelogEntry( version="0.6.0", @@ -13093,6 +13142,24 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ), ], ), + "transaction.method": AttributeMetadata( + brief="The HTTP method of a transaction", + type=AttributeType.STRING, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example="GET", + deprecation=DeprecationInfo( + replacement="http.request.method", status=DeprecationStatus.BACKFILL + ), + aliases=["http.request.method", "http.method", "http.request_method", "method"], + changelog=[ + ChangelogEntry( + version="next", + prs=[361], + description="Added transaction.method attribute", + ), + ], + ), "transaction": AttributeMetadata( brief="The sentry transaction (segment name).", type=AttributeType.STRING, @@ -13102,7 +13169,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): deprecation=DeprecationInfo( replacement="sentry.segment.name", status=DeprecationStatus.BACKFILL ), - aliases=["sentry.segment.name", "sentry.transaction"], + aliases=["sentry.span.name", "sentry.segment.name", "sentry.transaction"], changelog=[ ChangelogEntry( version="0.6.0", @@ -14413,6 +14480,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "sentry.segment_id": str, "sentry.server_sample_rate": float, "sentry.source": str, + "sentry.span.name": str, "sentry.span.source": str, "sentry.status.message": str, "sentry.status_code": int, @@ -14428,6 +14496,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "timber.tag": str, "time_to_full_display": float, "time_to_initial_display": float, + "transaction.method": str, "transaction": str, "ttfb.requestTime": float, "ttfb": float, diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index 8d676293..89a46c99 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -355,7 +355,7 @@ "_status": null, "replacement": "http.request.method" }, - "alias": ["http.request.method", "http.request_method", "http.method"], + "alias": ["http.request.method", "http.request_method", "http.method", "transaction.method"], "sdks": ["javascript-browser", "javascript-node"], "changelog": [ { @@ -501,7 +501,7 @@ "_status": "backfill", "replacement": "sentry.segment.name" }, - "alias": ["sentry.segment.name", "sentry.transaction"], + "alias": ["sentry.span.name", "sentry.segment.name", "sentry.transaction"], "changelog": [ { "version": "0.6.0", @@ -2260,7 +2260,7 @@ "_status": "backfill", "replacement": "http.request.method" }, - "alias": ["http.request.method", "http.request_method", "method"], + "alias": ["http.request.method", "http.request_method", "method", "transaction.method"], "changelog": [ { "version": "0.1.0", @@ -2284,7 +2284,7 @@ "_status": "backfill", "replacement": "http.request.method" }, - "alias": ["method", "http.method", "http.request.method"], + "alias": ["method", "http.method", "http.request.method", "transaction.method"], "changelog": [ { "version": "0.6.0", @@ -3308,7 +3308,7 @@ "replacement": "sentry.segment.name", "reason": "This attribute is being deprecated in favor of sentry.segment.name" }, - "alias": ["sentry.segment.name", "transaction"], + "alias": ["sentry.span.name", "sentry.segment.name", "transaction"], "changelog": [ { "version": "0.6.0", @@ -3320,6 +3320,28 @@ } ] }, + { + "key": "transaction.method", + "brief": "The HTTP method of a transaction", + "type": "string", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": "GET", + "deprecation": { + "_status": "backfill", + "replacement": "http.request.method" + }, + "alias": ["http.request.method", "http.method", "http.request_method", "method"], + "changelog": [ + { + "version": "next", + "prs": [361], + "description": "Added transaction.method attribute" + } + ] + }, { "key": "ttfb.requestTime", "brief": "The time it takes for the server to process the initial request and send the first byte of a response to the user's browser",