From b2b1635aa9f3a26d5e191b000570e2c1367103a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Daxb=C3=B6ck?= Date: Tue, 24 Feb 2026 18:41:10 +0100 Subject: [PATCH 1/2] feat(http): add http.server.request.time_in_queue attribute Adds the `http.server.request.time_in_queue` semantic convention attribute to capture the time (in milliseconds) a request spent waiting in the server queue before processing began. This attribute is populated from the `X-Request-Start` header set by reverse proxies (Nginx, HAProxy, Heroku router, etc.) and first introduced in sentry-ruby: https://github.com/getsentry/sentry-ruby/pull/2838 Co-Authored-By: Claude Sonnet 4.6 --- .../http/http__server__request__time_in_queue.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 model/attributes/http/http__server__request__time_in_queue.json diff --git a/model/attributes/http/http__server__request__time_in_queue.json b/model/attributes/http/http__server__request__time_in_queue.json new file mode 100644 index 000000000..8bf575c33 --- /dev/null +++ b/model/attributes/http/http__server__request__time_in_queue.json @@ -0,0 +1,11 @@ +{ + "key": "http.server.request.time_in_queue", + "brief": "The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request.", + "type": "double", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": 50.0, + "sdks": ["ruby"] +} From 9a4e1d204d5708f1ed9aa55318b079122da99983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Daxb=C3=B6ck?= Date: Tue, 24 Feb 2026 21:39:36 +0100 Subject: [PATCH 2/2] feat(http): add generated attribute definitions for http.server.request.time_in_queue Generate TypeScript and Python attribute definitions including type exports, metadata entries, and TypedDict annotations. Co-Authored-By: Claude --- .../sentry-conventions/src/attributes.ts | 34 +++++++++++++++++++ python/src/sentry_conventions/attributes.py | 21 ++++++++++++ 2 files changed, 55 insertions(+) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index ba0a8b599..a68750bc5 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -3914,6 +3914,26 @@ export const HTTP_SERVER_NAME = 'http.server_name'; */ export type HTTP_SERVER_NAME_TYPE = string; +// Path: model/attributes/http/http__server__request__time_in_queue.json + +/** + * The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request. `http.server.request.time_in_queue` + * + * Attribute Value Type: `number` {@link HTTP_SERVER_REQUEST_TIME_IN_QUEUE_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * @example 50 + */ +export const HTTP_SERVER_REQUEST_TIME_IN_QUEUE = 'http.server.request.time_in_queue'; + +/** + * Type for {@link HTTP_SERVER_REQUEST_TIME_IN_QUEUE} http.server.request.time_in_queue + */ +export type HTTP_SERVER_REQUEST_TIME_IN_QUEUE_TYPE = number; + // Path: model/attributes/http/http__status_code.json /** @@ -9072,6 +9092,7 @@ export const ATTRIBUTE_TYPE: Record = { [HTTP_ROUTE]: 'string', [HTTP_SCHEME]: 'string', [HTTP_SERVER_NAME]: 'string', + [HTTP_SERVER_REQUEST_TIME_IN_QUEUE]: 'double', [HTTP_STATUS_CODE]: 'integer', [HTTP_TARGET]: 'string', [HTTP_URL]: 'string', @@ -9501,6 +9522,7 @@ export type AttributeName = | typeof HTTP_ROUTE | typeof HTTP_SCHEME | typeof HTTP_SERVER_NAME + | typeof HTTP_SERVER_REQUEST_TIME_IN_QUEUE | typeof HTTP_STATUS_CODE | typeof HTTP_TARGET | typeof HTTP_URL @@ -11735,6 +11757,17 @@ export const ATTRIBUTE_METADATA: Record = { }, aliases: [SERVER_ADDRESS, NET_HOST_NAME, HTTP_HOST], }, + [HTTP_SERVER_REQUEST_TIME_IN_QUEUE]: { + brief: + 'The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request.', + type: 'double', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: 50, + sdks: ['ruby'], + }, [HTTP_STATUS_CODE]: { brief: 'The status code of the HTTP response.', type: 'integer', @@ -14293,6 +14326,7 @@ export type Attributes = { [HTTP_ROUTE]?: HTTP_ROUTE_TYPE; [HTTP_SCHEME]?: HTTP_SCHEME_TYPE; [HTTP_SERVER_NAME]?: HTTP_SERVER_NAME_TYPE; + [HTTP_SERVER_REQUEST_TIME_IN_QUEUE]?: HTTP_SERVER_REQUEST_TIME_IN_QUEUE_TYPE; [HTTP_STATUS_CODE]?: HTTP_STATUS_CODE_TYPE; [HTTP_TARGET]?: HTTP_TARGET_TYPE; [HTTP_URL]?: HTTP_URL_TYPE; diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 2a2b4330f..7a52d7b46 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -2263,6 +2263,18 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "https" """ + # Path: model/attributes/http/http__server__request__time_in_queue.json + HTTP_SERVER_REQUEST_TIME_IN_QUEUE: Literal["http.server.request.time_in_queue"] = ( + "http.server.request.time_in_queue" + ) + """The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request. + + Type: float + Contains PII: maybe + Defined in OTEL: No + Example: 50 + """ + # Path: model/attributes/http/http__server_name.json HTTP_SERVER_NAME: Literal["http.server_name"] = "http.server_name" """The server domain name @@ -6342,6 +6354,14 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): deprecation=DeprecationInfo(replacement="url.scheme"), aliases=["url.scheme"], ), + "http.server.request.time_in_queue": AttributeMetadata( + brief="The time in milliseconds the request spent in the server queue before processing began. Measured from the X-Request-Start header set by reverse proxies (e.g., Nginx, HAProxy, Heroku) to when the application started handling the request.", + type=AttributeType.DOUBLE, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example=50, + sdks=["ruby"], + ), "http.server_name": AttributeMetadata( brief="The server domain name", type=AttributeType.STRING, @@ -8368,6 +8388,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "http.response_transfer_size": int, "http.route": str, "http.scheme": str, + "http.server.request.time_in_queue": float, "http.server_name": str, "http.status_code": int, "http.target": str,