Skip to content

Commit e1a4f77

Browse files
committed
fix(tracing): Don't set method multiple times
1 parent 6bd2637 commit e1a4f77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
3131
expect(transaction[0].spans).toEqual(
3232
expect.arrayContaining([
3333
expect.objectContaining({
34-
data: { method: 'GET', url: 'http://example.com', type: 'fetch' },
34+
data: { 'http.method': 'GET', url: 'http://example.com', type: 'fetch' },
3535
description: 'GET http://example.com',
3636
op: 'http.client',
3737
parent_span_id: expect.any(String),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export function fetchCallback(
193193
if (currentSpan && activeTransaction) {
194194
const span = currentSpan.startChild({
195195
data: {
196-
...handlerData.fetchData,
196+
url: handlerData.fetchData.url,
197197
type: 'fetch',
198198
'http.method': handlerData.fetchData.method,
199199
},

0 commit comments

Comments
 (0)