Skip to content

Commit

Permalink
fix(nextjs): Rename nextjs.data.server ops (#5830)
Browse files Browse the repository at this point in the history
`nextjs.data.server` -> `http.server` for transactions, and `nextjs.data.server` -> `function.nextjs` for spans.
  • Loading branch information
AbhiPrasad committed Sep 28, 2022
1 parent 186bcda commit fac1103
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/nextjs/src/config/wrappers/wrapperUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function callTracedServerSideDataFetcher<F extends (...args: any[]) => Pr

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

const dataFetcherSpan = requestTransaction.startChild({
op: 'nextjs.data.server',
op: 'function.nextjs',
description: `${options.dataFetchingMethodName} (${options.dataFetcherRouteName})`,
status: 'ok',
});
Expand Down Expand Up @@ -173,7 +173,7 @@ export async function callDataFetcherTraced<F extends (...args: any[]) => Promis
// Capture the route, since pre-loading, revalidation, etc might mean that this span may happen during another
// route's transaction
const span = transaction.startChild({
op: 'nextjs.data.server',
op: 'function.nextjs',
description: `${dataFetchingMethodName} (${parameterizedRoute})`,
status: 'ok',
});
Expand Down
4 changes: 2 additions & 2 deletions packages/nextjs/test/config/wrappers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('data-fetching function wrappers', () => {
expect(startTransactionSpy).toHaveBeenCalledWith(
expect.objectContaining({
name: '/tricks/[trickName]',
op: 'nextjs.data.server',
op: 'http.server',
metadata: expect.objectContaining({ source: 'route' }),
}),
{
Expand All @@ -64,7 +64,7 @@ describe('data-fetching function wrappers', () => {
expect(startTransactionSpy).toHaveBeenCalledWith(
expect.objectContaining({
name: '/tricks/[trickName]',
op: 'nextjs.data.server',
op: 'http.server',
metadata: expect.objectContaining({ source: 'route' }),
}),
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = async ({ url: urlBase, argv }) => {
{
contexts: {
trace: {
op: 'nextjs.data.server',
op: 'http.server',
status: 'internal_error',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async ({ url: urlBase, argv }) => {
{
contexts: {
trace: {
op: 'nextjs.data.server',
op: 'http.server',
status: 'ok',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async ({ url: urlBase, argv }) => {
{
contexts: {
trace: {
op: 'nextjs.data.server',
op: 'http.server',
status: 'ok',
},
},
Expand Down

0 comments on commit fac1103

Please sign in to comment.