diff --git a/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/propagation.test.ts b/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/propagation.test.ts index 8132470c8e38..39f6de466463 100644 --- a/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/propagation.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/propagation.test.ts @@ -92,12 +92,12 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => { 'http.response.status_text': { value: 'OK', type: 'string' }, 'http.route': { value: '/test-outgoing-http/:id', type: 'string' }, 'http.request.header.accept': { value: '*/*', type: 'string' }, - 'http.request.header.accept_encoding': { value: 'gzip, deflate', type: 'string' }, - 'http.request.header.accept_language': { value: '*', type: 'string' }, + 'http.request.header.accept-encoding': { value: 'gzip, deflate', type: 'string' }, + 'http.request.header.accept-language': { value: '*', type: 'string' }, 'http.request.header.connection': { value: 'keep-alive', type: 'string' }, 'http.request.header.host': { value: 'localhost:3030', type: 'string' }, - 'http.request.header.sec_fetch_mode': { value: 'cors', type: 'string' }, - 'http.request.header.user_agent': { value: 'node', type: 'string' }, + 'http.request.header.sec-fetch-mode': { value: 'cors', type: 'string' }, + 'http.request.header.user-agent': { value: 'node', type: 'string' }, }), }), ); @@ -134,7 +134,7 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => { 'http.request.header.baggage': { value: expect.any(String), type: 'string' }, 'http.request.header.connection': { value: 'keep-alive', type: 'string' }, 'http.request.header.host': { value: expect.any(String), type: 'string' }, - 'http.request.header.sentry_trace': { + 'http.request.header.sentry-trace': { value: expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-1/), type: 'string', }, @@ -233,12 +233,12 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => { 'http.response.status_text': { value: 'OK', type: 'string' }, 'http.route': { value: '/test-outgoing-fetch/:id', type: 'string' }, 'http.request.header.accept': { value: '*/*', type: 'string' }, - 'http.request.header.accept_encoding': { value: 'gzip, deflate', type: 'string' }, - 'http.request.header.accept_language': { value: '*', type: 'string' }, + 'http.request.header.accept-encoding': { value: 'gzip, deflate', type: 'string' }, + 'http.request.header.accept-language': { value: '*', type: 'string' }, 'http.request.header.connection': { value: 'keep-alive', type: 'string' }, 'http.request.header.host': { value: expect.any(String), type: 'string' }, - 'http.request.header.sec_fetch_mode': { value: 'cors', type: 'string' }, - 'http.request.header.user_agent': { value: 'node', type: 'string' }, + 'http.request.header.sec-fetch-mode': { value: 'cors', type: 'string' }, + 'http.request.header.user-agent': { value: 'node', type: 'string' }, }), }), ); @@ -274,17 +274,17 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => { 'user_agent.original': { value: 'node', type: 'string' }, 'http.route': { value: '/test-inbound-headers/:id', type: 'string' }, 'http.request.header.accept': { value: '*/*', type: 'string' }, - 'http.request.header.accept_encoding': { value: 'gzip, deflate', type: 'string' }, - 'http.request.header.accept_language': { value: '*', type: 'string' }, + 'http.request.header.accept-encoding': { value: 'gzip, deflate', type: 'string' }, + 'http.request.header.accept-language': { value: '*', type: 'string' }, 'http.request.header.baggage': { value: expect.any(String), type: 'string' }, 'http.request.header.connection': { value: 'keep-alive', type: 'string' }, 'http.request.header.host': { value: expect.any(String), type: 'string' }, - 'http.request.header.sec_fetch_mode': { value: 'cors', type: 'string' }, - 'http.request.header.sentry_trace': { + 'http.request.header.sec-fetch-mode': { value: 'cors', type: 'string' }, + 'http.request.header.sentry-trace': { value: expect.stringMatching(/[a-f0-9]{32}-[a-f0-9]{16}-1/), type: 'string', }, - 'http.request.header.user_agent': { value: 'node', type: 'string' }, + 'http.request.header.user-agent': { value: 'node', type: 'string' }, }), }), ); diff --git a/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/spans.test.ts b/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/spans.test.ts index 21283f8ea1a0..9de1b692cdd7 100644 --- a/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/spans.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-fastify-6/tests/spans.test.ts @@ -45,12 +45,12 @@ test('Sends an API route span', async ({ baseURL }) => { 'http.response.status_text': { value: 'OK', type: 'string' }, 'http.route': { value: '/test-transaction', type: 'string' }, 'http.request.header.accept': { value: '*/*', type: 'string' }, - 'http.request.header.accept_encoding': { value: 'gzip, deflate', type: 'string' }, - 'http.request.header.accept_language': { value: '*', type: 'string' }, + 'http.request.header.accept-encoding': { value: 'gzip, deflate', type: 'string' }, + 'http.request.header.accept-language': { value: '*', type: 'string' }, 'http.request.header.connection': { value: 'keep-alive', type: 'string' }, 'http.request.header.host': { value: expect.any(String), type: 'string' }, - 'http.request.header.sec_fetch_mode': { value: 'cors', type: 'string' }, - 'http.request.header.user_agent': { value: 'node', type: 'string' }, + 'http.request.header.sec-fetch-mode': { value: 'cors', type: 'string' }, + 'http.request.header.user-agent': { value: 'node', type: 'string' }, }), }), ); @@ -139,8 +139,8 @@ test('Captures request metadata', async ({ baseURL }) => { expect.stringMatching(/^http:\/\/localhost:(\d+)\/test-post$/), ); expect(segmentEvent.attributes['http.request.method']?.value).toEqual('POST'); - expect(segmentEvent.attributes['http.request.header.user_agent']?.value).toEqual(expect.stringContaining('')); - expect(segmentEvent.attributes['http.request.header.content_type']?.value).toEqual('application/json'); + expect(segmentEvent.attributes['http.request.header.user-agent']?.value).toEqual(expect.stringContaining('')); + expect(segmentEvent.attributes['http.request.header.content-type']?.value).toEqual('application/json'); expect(segmentEvent.attributes['http.request.body.data']?.value).toBe(JSON.stringify({ foo: 'bar', other: 1 })); expect(segmentEvent.attributes['user.ip_address']?.value).toEqual('::1');