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
2 changes: 2 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,8 @@ Legacy HTTP span attributes were replaced by their current semantic-convention e

On server-side HTTP spans, the `content-length` header is now always reported as `http.request.body.size`/`http.response.body.size` instead of switching to `http.request_body_size_uncompressed` when the no encoding was present.

The `http.request.header.<key>`/`http.response.header.<key>` attributes now write the header name lowercased as previously but no longer replaces dashes (`-`) with underscores (`_`). For example, the SDK now sets `http.request.header.user-agent` rather than `http.request.header.user_agent`. The same applies to the cookie names in `http.request.header.cookie.<name>` and `http.request.header.set-cookie.<name>`.

#### Network attributes

Network-related span attributes now use the current Sentry semantic conventions, aligned across SDKs. If you query, transform, or alert on the legacy `net.*` fields, update those references:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,15 @@ it('sends a streamed span envelope with correct spans for a manually started spa
type: 'string',
value: '*/*',
},
'http.request.header.accept_encoding': {
'http.request.header.accept-encoding': {
type: 'string',
value: 'br, gzip',
},
'http.request.header.accept_language': {
'http.request.header.accept-language': {
type: 'string',
value: '*',
},
'http.request.header.cf_connecting_ip': {
'http.request.header.cf-connecting-ip': {
type: 'string',
value: '127.0.0.1',
},
Expand All @@ -249,11 +249,11 @@ it('sends a streamed span envelope with correct spans for a manually started spa
type: 'string',
value: expect.stringMatching(/^localhost:.+$/),
},
'http.request.header.sec_fetch_mode': {
'http.request.header.sec-fetch-mode': {
type: 'string',
value: 'cors',
},
'http.request.header.user_agent': {
'http.request.header.user-agent': {
type: 'string',
value: 'node',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
'url.full': { value: expect.stringContaining('/test-ssr'), type: 'string' },
// demonstrates that the request data integration can extract headers
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});
});
Expand Down Expand Up @@ -153,10 +153,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/user-page/myUsername123'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});

// HTTP client span - with span streaming only the domain is kept in the name, the URL lives in
Expand All @@ -175,10 +175,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.origin': { value: 'auto.http.astro', type: 'string' },
'sentry.segment.name.source': { value: 'route', type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate', type: 'string' },
'http.request.header.accept_language': { value: '*', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'cors', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate', type: 'string' },
'http.request.header.accept-language': { value: '*', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'cors', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});

Expand Down Expand Up @@ -216,10 +216,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/catchAll/hell0/whatever-do'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});
});
Expand Down Expand Up @@ -254,10 +254,10 @@ test.describe('parametrized vs static paths', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/user-page/settings'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
'url.full': { value: expect.stringContaining('/test-ssr'), type: 'string' },
// demonstrates that the request data integration can extract headers
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});
});
Expand Down Expand Up @@ -153,10 +153,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/user-page/myUsername123'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});

// HTTP client span - with span streaming only the domain is kept in the name, the URL lives in
Expand All @@ -175,10 +175,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.origin': { value: 'auto.http.astro', type: 'string' },
'sentry.segment.name.source': { value: 'route', type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate', type: 'string' },
'http.request.header.accept_language': { value: '*', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'cors', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate', type: 'string' },
'http.request.header.accept-language': { value: '*', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'cors', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});

Expand Down Expand Up @@ -216,10 +216,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/catchAll/hell0/whatever-do'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});
});
Expand Down Expand Up @@ -254,10 +254,10 @@ test.describe('parametrized vs static paths', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/user-page/settings'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ test.describe('tracing in static routes with server islands', () => {
'sentry.origin': { value: 'auto.http.astro', type: 'string' },
'sentry.segment.name.source': { value: 'route', type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'cors', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'gzip, deflate, br, zstd', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'cors', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});

// unfortunately, the server island trace id is not the same as the client pageload trace id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ test.describe('tracing in dynamically rendered (ssr) routes', () => {
'sentry.sdk.name': { value: 'sentry.javascript.cloudflare', type: 'string' },
// demonstrates that the request data integration can extract headers
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});
});
Expand Down Expand Up @@ -152,10 +152,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/user-page/myUsername123'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});

// HTTP client span - with span streaming only the domain is kept in the name, the URL lives in
Expand All @@ -172,7 +172,7 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.op': { value: 'http.server', type: 'string' },
'sentry.origin': { value: 'auto.http.astro', type: 'string' },
'sentry.segment.name.source': { value: 'route', type: 'string' },
'http.request.header.accept_encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept-encoding': { value: 'br, gzip', type: 'string' },
});
});

Expand Down Expand Up @@ -210,10 +210,10 @@ test.describe('nested SSR routes (client, server, server request)', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/catchAll/hell0/whatever-do'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});
});
Expand Down Expand Up @@ -248,10 +248,10 @@ test.describe('parametrized vs static paths', () => {
'sentry.segment.name.source': { value: 'route', type: 'string' },
'url.full': { value: expect.stringContaining('/user-page/settings'), type: 'string' },
'http.request.header.accept': { value: expect.any(String), type: 'string' },
'http.request.header.accept_encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept_language': { value: 'en-US', type: 'string' },
'http.request.header.sec_fetch_mode': { value: 'navigate', type: 'string' },
'http.request.header.user_agent': { value: expect.any(String), type: 'string' },
'http.request.header.accept-encoding': { value: 'br, gzip', type: 'string' },
'http.request.header.accept-language': { value: 'en-US', type: 'string' },
'http.request.header.sec-fetch-mode': { value: 'navigate', type: 'string' },
'http.request.header.user-agent': { value: expect.any(String), type: 'string' },
});
});

Expand Down
Loading
Loading