Skip to content

Commit 4c180eb

Browse files
authored
fix(gatsby): Fix tracing for createPages (#35795)
1 parent 625b141 commit 4c180eb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/gatsby/src/services/create-pages.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { actions } from "../redux/actions"
77
import { deleteUntouchedPages, findChangedPages } from "../utils/changed-pages"
88
import { getDataStore } from "../datastore"
99

10+
const isInitialCreatePages = true
11+
let createPagesCount = 0
1012
export async function createPages({
1113
parentSpan,
1214
gatsbyNodeGraphQLFunction,
@@ -44,11 +46,15 @@ export async function createPages({
4446
return returnValue
4547
}
4648

49+
createPagesCount += 1
50+
const traceId = isInitialCreatePages
51+
? `initial-createPages`
52+
: `createPages #${createPagesCount}`
4753
await apiRunnerNode(
4854
`createPages`,
4955
{
5056
graphql: wrappedGraphQL,
51-
traceId: `initial-createPages`,
57+
traceId,
5258
waitForCascadingActions: true,
5359
parentSpan: activity.span,
5460
deferNodeMutation,

0 commit comments

Comments
 (0)