Skip to content

Commit 16bb43d

Browse files
authored
feat(http): Add new http.request.worker_start and http.request.redirect_end attributes (#130)
* feat(http): Add new `http.request` attributes * http.request.worker_start * biome * double
1 parent dd7f961 commit 16bb43d

File tree

4 files changed

+90
-0
lines changed

4 files changed

+90
-0
lines changed

generated/attributes/http.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
- [http.request.fetch_start](#httprequestfetch_start)
1414
- [http.request.header.\<key\>](#httprequestheaderkey)
1515
- [http.request.method](#httprequestmethod)
16+
- [http.request.redirect_end](#httprequestredirect_end)
1617
- [http.request.redirect_start](#httprequestredirect_start)
1718
- [http.request.request_start](#httprequestrequest_start)
1819
- [http.request.resend_count](#httprequestresend_count)
1920
- [http.request.response_end](#httprequestresponse_end)
2021
- [http.request.response_start](#httprequestresponse_start)
2122
- [http.request.secure_connection_start](#httprequestsecure_connection_start)
23+
- [http.request.worker_start](#httprequestworker_start)
2224
- [http.response.body.size](#httpresponsebodysize)
2325
- [http.response.header.\<key\>](#httpresponseheaderkey)
2426
- [http.response.header.content-length](#httpresponseheadercontentlength)
@@ -153,6 +155,17 @@ The HTTP method used.
153155
| Example | `GET` |
154156
| Aliases | `method`, `http.method` |
155157

158+
### http.request.redirect_end
159+
160+
The UNIX timestamp representing the timestamp immediately after receiving the last byte of the response of the last redirect
161+
162+
| Property | Value |
163+
| --- | --- |
164+
| Type | `double` |
165+
| Has PII | false |
166+
| Exists in OpenTelemetry | No |
167+
| Example | `1732829558` |
168+
156169
### http.request.redirect_start
157170

158171
The UNIX timestamp representing the start time of the fetch which that initiates the redirect.
@@ -219,6 +232,17 @@ The UNIX timestamp representing the time immediately before the browser starts t
219232
| Exists in OpenTelemetry | No |
220233
| Example | `1732829555` |
221234

235+
### http.request.worker_start
236+
237+
The UNIX timestamp representing the timestamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running.
238+
239+
| Property | Value |
240+
| --- | --- |
241+
| Type | `double` |
242+
| Has PII | false |
243+
| Exists in OpenTelemetry | No |
244+
| Example | `1732829553` |
245+
222246
### http.response.body.size
223247

224248
The encoded body size of the response (in bytes).

javascript/sentry-conventions/src/attributes.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3259,6 +3259,26 @@ export const HTTP_REQUEST_METHOD = 'http.request.method';
32593259
*/
32603260
export type HTTP_REQUEST_METHOD_TYPE = string;
32613261

3262+
// Path: model/attributes/http/http__request__redirect_end.json
3263+
3264+
/**
3265+
* The UNIX timestamp representing the timestamp immediately after receiving the last byte of the response of the last redirect `http.request.redirect_end`
3266+
*
3267+
* Attribute Value Type: `number` {@link HTTP_REQUEST_REDIRECT_END_TYPE}
3268+
*
3269+
* Contains PII: false
3270+
*
3271+
* Attribute defined in OTEL: No
3272+
*
3273+
* @example 1732829558
3274+
*/
3275+
export const HTTP_REQUEST_REDIRECT_END = 'http.request.redirect_end';
3276+
3277+
/**
3278+
* Type for {@link HTTP_REQUEST_REDIRECT_END} http.request.redirect_end
3279+
*/
3280+
export type HTTP_REQUEST_REDIRECT_END_TYPE = number;
3281+
32623282
// Path: model/attributes/http/http__request__redirect_start.json
32633283

32643284
/**
@@ -3379,6 +3399,26 @@ export const HTTP_REQUEST_SECURE_CONNECTION_START = 'http.request.secure_connect
33793399
*/
33803400
export type HTTP_REQUEST_SECURE_CONNECTION_START_TYPE = number;
33813401

3402+
// Path: model/attributes/http/http__request__worker_start.json
3403+
3404+
/**
3405+
* The UNIX timestamp representing the timestamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running. `http.request.worker_start`
3406+
*
3407+
* Attribute Value Type: `number` {@link HTTP_REQUEST_WORKER_START_TYPE}
3408+
*
3409+
* Contains PII: false
3410+
*
3411+
* Attribute defined in OTEL: No
3412+
*
3413+
* @example 1732829553
3414+
*/
3415+
export const HTTP_REQUEST_WORKER_START = 'http.request.worker_start';
3416+
3417+
/**
3418+
* Type for {@link HTTP_REQUEST_WORKER_START} http.request.worker_start
3419+
*/
3420+
export type HTTP_REQUEST_WORKER_START_TYPE = number;
3421+
33823422
// Path: model/attributes/http/http__response__body__size.json
33833423

33843424
/**
@@ -6639,12 +6679,14 @@ export type Attributes = {
66396679
[HTTP_REQUEST_FETCH_START]?: HTTP_REQUEST_FETCH_START_TYPE;
66406680
[HTTP_REQUEST_HEADER_KEY]?: HTTP_REQUEST_HEADER_KEY_TYPE;
66416681
[HTTP_REQUEST_METHOD]?: HTTP_REQUEST_METHOD_TYPE;
6682+
[HTTP_REQUEST_REDIRECT_END]?: HTTP_REQUEST_REDIRECT_END_TYPE;
66426683
[HTTP_REQUEST_REDIRECT_START]?: HTTP_REQUEST_REDIRECT_START_TYPE;
66436684
[HTTP_REQUEST_REQUEST_START]?: HTTP_REQUEST_REQUEST_START_TYPE;
66446685
[HTTP_REQUEST_RESEND_COUNT]?: HTTP_REQUEST_RESEND_COUNT_TYPE;
66456686
[HTTP_REQUEST_RESPONSE_END]?: HTTP_REQUEST_RESPONSE_END_TYPE;
66466687
[HTTP_REQUEST_RESPONSE_START]?: HTTP_REQUEST_RESPONSE_START_TYPE;
66476688
[HTTP_REQUEST_SECURE_CONNECTION_START]?: HTTP_REQUEST_SECURE_CONNECTION_START_TYPE;
6689+
[HTTP_REQUEST_WORKER_START]?: HTTP_REQUEST_WORKER_START_TYPE;
66486690
[HTTP_RESPONSE_BODY_SIZE]?: HTTP_RESPONSE_BODY_SIZE_TYPE;
66496691
[HTTP_RESPONSE_HEADER_KEY]?: HTTP_RESPONSE_HEADER_KEY_TYPE;
66506692
[HTTP_RESPONSE_HEADER_CONTENT_LENGTH]?: HTTP_RESPONSE_HEADER_CONTENT_LENGTH_TYPE;
@@ -6922,12 +6964,14 @@ export type FullAttributes = {
69226964
[HTTP_REQUEST_FETCH_START]?: HTTP_REQUEST_FETCH_START_TYPE;
69236965
[HTTP_REQUEST_HEADER_KEY]?: HTTP_REQUEST_HEADER_KEY_TYPE;
69246966
[HTTP_REQUEST_METHOD]?: HTTP_REQUEST_METHOD_TYPE;
6967+
[HTTP_REQUEST_REDIRECT_END]?: HTTP_REQUEST_REDIRECT_END_TYPE;
69256968
[HTTP_REQUEST_REDIRECT_START]?: HTTP_REQUEST_REDIRECT_START_TYPE;
69266969
[HTTP_REQUEST_REQUEST_START]?: HTTP_REQUEST_REQUEST_START_TYPE;
69276970
[HTTP_REQUEST_RESEND_COUNT]?: HTTP_REQUEST_RESEND_COUNT_TYPE;
69286971
[HTTP_REQUEST_RESPONSE_END]?: HTTP_REQUEST_RESPONSE_END_TYPE;
69296972
[HTTP_REQUEST_RESPONSE_START]?: HTTP_REQUEST_RESPONSE_START_TYPE;
69306973
[HTTP_REQUEST_SECURE_CONNECTION_START]?: HTTP_REQUEST_SECURE_CONNECTION_START_TYPE;
6974+
[HTTP_REQUEST_WORKER_START]?: HTTP_REQUEST_WORKER_START_TYPE;
69316975
[HTTP_RESPONSE_BODY_SIZE]?: HTTP_RESPONSE_BODY_SIZE_TYPE;
69326976
[HTTP_RESPONSE_HEADER_KEY]?: HTTP_RESPONSE_HEADER_KEY_TYPE;
69336977
[HTTP_RESPONSE_HEADER_CONTENT_LENGTH]?: HTTP_RESPONSE_HEADER_CONTENT_LENGTH_TYPE;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"key": "http.request.redirect_end",
3+
"brief": "The UNIX timestamp representing the timestamp immediately after receiving the last byte of the response of the last redirect",
4+
"type": "double",
5+
"pii": {
6+
"key": "false"
7+
},
8+
"is_in_otel": false,
9+
"example": 1732829558,
10+
"sdks": ["javascript-browser"]
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"key": "http.request.worker_start",
3+
"brief": "The UNIX timestamp representing the timestamp immediately before dispatching the FetchEvent if a Service Worker thread is already running, or immediately before starting the Service Worker thread if it is not already running.",
4+
"type": "double",
5+
"pii": {
6+
"key": "false"
7+
},
8+
"is_in_otel": false,
9+
"example": 1732829553,
10+
"sdks": ["javascript-browser"]
11+
}

0 commit comments

Comments
 (0)