Skip to content

Commit fac1103

Browse files
authored
fix(nextjs): Rename nextjs.data.server ops (#5830)
`nextjs.data.server` -> `http.server` for transactions, and `nextjs.data.server` -> `function.nextjs` for spans.
1 parent 186bcda commit fac1103

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

packages/nextjs/src/config/wrappers/wrapperUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function callTracedServerSideDataFetcher<F extends (...args: any[]) => Pr
8888

8989
const newTransaction = startTransaction(
9090
{
91-
op: 'nextjs.data.server',
91+
op: 'http.server',
9292
name: options.requestedRouteName,
9393
...traceparentData,
9494
status: 'ok',
@@ -110,7 +110,7 @@ export function callTracedServerSideDataFetcher<F extends (...args: any[]) => Pr
110110
}
111111

112112
const dataFetcherSpan = requestTransaction.startChild({
113-
op: 'nextjs.data.server',
113+
op: 'function.nextjs',
114114
description: `${options.dataFetchingMethodName} (${options.dataFetcherRouteName})`,
115115
status: 'ok',
116116
});
@@ -173,7 +173,7 @@ export async function callDataFetcherTraced<F extends (...args: any[]) => Promis
173173
// Capture the route, since pre-loading, revalidation, etc might mean that this span may happen during another
174174
// route's transaction
175175
const span = transaction.startChild({
176-
op: 'nextjs.data.server',
176+
op: 'function.nextjs',
177177
description: `${dataFetchingMethodName} (${parameterizedRoute})`,
178178
status: 'ok',
179179
});

packages/nextjs/test/config/wrappers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('data-fetching function wrappers', () => {
4242
expect(startTransactionSpy).toHaveBeenCalledWith(
4343
expect.objectContaining({
4444
name: '/tricks/[trickName]',
45-
op: 'nextjs.data.server',
45+
op: 'http.server',
4646
metadata: expect.objectContaining({ source: 'route' }),
4747
}),
4848
{
@@ -64,7 +64,7 @@ describe('data-fetching function wrappers', () => {
6464
expect(startTransactionSpy).toHaveBeenCalledWith(
6565
expect.objectContaining({
6666
name: '/tricks/[trickName]',
67-
op: 'nextjs.data.server',
67+
op: 'http.server',
6868
metadata: expect.objectContaining({ source: 'route' }),
6969
}),
7070
{

packages/nextjs/test/integration/test/server/errorServerSideProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = async ({ url: urlBase, argv }) => {
3232
{
3333
contexts: {
3434
trace: {
35-
op: 'nextjs.data.server',
35+
op: 'http.server',
3636
status: 'internal_error',
3737
},
3838
},

packages/nextjs/test/integration/test/server/tracingServerGetInitialProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = async ({ url: urlBase, argv }) => {
1010
{
1111
contexts: {
1212
trace: {
13-
op: 'nextjs.data.server',
13+
op: 'http.server',
1414
status: 'ok',
1515
},
1616
},

packages/nextjs/test/integration/test/server/tracingServerGetServerSideProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = async ({ url: urlBase, argv }) => {
1010
{
1111
contexts: {
1212
trace: {
13-
op: 'nextjs.data.server',
13+
op: 'http.server',
1414
status: 'ok',
1515
},
1616
},

0 commit comments

Comments
 (0)