Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test('should correctly instrument `fetch` for performance tracing', async ({ pag
expect(transaction[0].spans).toEqual(
expect.arrayContaining([
expect.objectContaining({
data: { method: 'GET', url: 'http://example.com', type: 'fetch' },
data: { 'http.method': 'GET', url: 'http://example.com', type: 'fetch' },
description: 'GET http://example.com',
op: 'http.client',
parent_span_id: expect.any(String),
Expand Down
4 changes: 2 additions & 2 deletions packages/nextjs/test/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ for NEXTJS_VERSION in 10 11 12 13; do
exit 0
fi

# Next.js v13 requires at least Node v14
if [ "$NODE_MAJOR" -lt "14" ] && [ "$NEXTJS_VERSION" -ge "13" ]; then
# Next.js v13 requires at least Node v16
if [ "$NEXTJS_VERSION" -ge "16" ] && [ "$NEXTJS_VERSION" -ge "15" ] && [ "$NODE_MAJOR" -lt "14" ] && [ "$NEXTJS_VERSION" -ge "13" ]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo "[nextjs@$NEXTJS_VERSION] Not compatible with Node $NODE_MAJOR"
exit 0
fi
Expand Down
7 changes: 4 additions & 3 deletions packages/tracing-internal/src/browser/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,14 @@ export function fetchCallback(
const activeTransaction = currentSpan && currentSpan.transaction;

if (currentSpan && activeTransaction) {
const { method, url } = handlerData.fetchData;
const span = currentSpan.startChild({
data: {
...handlerData.fetchData,
url,
type: 'fetch',
'http.method': handlerData.fetchData.method,
'http.method': method,
},
description: `${handlerData.fetchData.method} ${handlerData.fetchData.url}`,
description: `${method} ${url}`,
op: 'http.client',
});

Expand Down