Skip to content

Commit d3729ba

Browse files
committed
add new data attribute in tests
1 parent dd240f7 commit d3729ba

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/middleware.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ test('Should trace outgoing fetch requests inside middleware and create breadcru
6363
expect(middlewareTransaction.spans).toEqual(
6464
expect.arrayContaining([
6565
{
66-
data: { 'http.method': 'GET', 'http.response.status_code': 200, type: 'fetch', url: 'http://localhost:3030/' },
66+
data: {
67+
'http.method': 'GET',
68+
'http.response.status_code': 200,
69+
type: 'fetch',
70+
url: 'http://localhost:3030/',
71+
'sentry.op': 'http.client',
72+
},
6773
description: 'GET http://localhost:3030/',
6874
op: 'http.client',
6975
origin: 'auto.http.wintercg_fetch',

dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/propagation.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ test('Propagates trace for outgoing http requests', async ({ baseURL }) => {
6363
url: 'http://localhost:3030/test-outgoing-http',
6464
'otel.kind': 'SERVER',
6565
'http.response.status_code': 200,
66+
'sentry.op': 'http.server',
6667
},
6768
op: 'http.server',
6869
span_id: expect.any(String),
@@ -156,6 +157,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
156157
url: 'http://localhost:3030/test-outgoing-fetch',
157158
'otel.kind': 'SERVER',
158159
'http.response.status_code': 200,
160+
'sentry.op': 'http.server',
159161
},
160162
op: 'http.server',
161163
span_id: expect.any(String),
@@ -178,6 +180,7 @@ test('Propagates trace for outgoing fetch requests', async ({ baseURL }) => {
178180
url: 'http://localhost:3030/test-inbound-headers',
179181
'otel.kind': 'SERVER',
180182
'http.response.status_code': 200,
183+
'sentry.op': 'http.server',
181184
},
182185
op: 'http.server',
183186
parent_span_id: outgoingHttpSpanId,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
/// <reference types="next/navigation-types/compat/navigation" />
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/basic-features/typescript for more information.

packages/nextjs/test/integration/test/client/tracingFetch.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
3737
type: 'fetch',
3838
'http.response_content_length': expect.any(Number),
3939
'http.response.status_code': 200,
40+
'sentry.op': 'http.client',
4041
},
4142
description: 'GET http://example.com',
4243
op: 'http.client',

packages/tracing-internal/test/browser/request.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ describe('callbacks', () => {
263263
'http.response.status_code': 404,
264264
type: 'fetch',
265265
url: 'http://dogs.are.great/',
266+
'sentry.op': 'http.client',
266267
});
268+
expect(finishedSpan.op).toBe('http.client');
267269
});
268270
});
269271

0 commit comments

Comments
 (0)