Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
802073e7
Unverified
Commit
802073e7
authored
Mar 03, 2026
by
Jiachi Liu
Committed by
GitHub
Mar 03, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[otel] set parent span name (#90840)
parent
2ae779cf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
0 deletions
+5
-0
.gitignore
.gitignore
+1
-0
app-page.ts
packages/next/src/build/templates/app-page.ts
+1
-0
app-route.ts
packages/next/src/build/templates/app-route.ts
+1
-0
pages-api.ts
packages/next/src/build/templates/pages-api.ts
+1
-0
pages-handler.ts
...ages/next/src/server/route-modules/pages/pages-handler.ts
+1
-0
No files found.
.gitignore
View file @
802073e7
...
@@ -68,6 +68,7 @@ test-timings.json
...
@@ -68,6 +68,7 @@ test-timings.json
.claude/settings.local.json
.claude/settings.local.json
.claude/plans/
.claude/plans/
.claude/todos.json
.claude/todos.json
.claude/worktrees
CLAUDE.local.md
CLAUDE.local.md
# Conductor (worktrees created by Conductor app, but keep scripts/)
# Conductor (worktrees created by Conductor app, but keep scripts/)
...
...
packages/next/src/build/templates/app-page.ts
View file @
802073e7
...
@@ -598,6 +598,7 @@ export async function handler(
...
@@ -598,6 +598,7 @@ export async function handler(
// a platform-created HTTP span in adapter deployments).
// a platform-created HTTP span in adapter deployments).
if
(
parentSpan
&&
parentSpan
!==
span
)
{
if
(
parentSpan
&&
parentSpan
!==
span
)
{
parentSpan
.
setAttribute
(
'http.route'
,
route
)
parentSpan
.
setAttribute
(
'http.route'
,
route
)
parentSpan
.
updateName
(
name
)
}
}
}
else
{
}
else
{
span
.
updateName
(
`
${
method
}
${
srcPage
}
`
)
span
.
updateName
(
`
${
method
}
${
srcPage
}
`
)
...
...
packages/next/src/build/templates/app-route.ts
View file @
802073e7
...
@@ -306,6 +306,7 @@ export async function handler(
...
@@ -306,6 +306,7 @@ export async function handler(
// a platform-created HTTP span in adapter deployments).
// a platform-created HTTP span in adapter deployments).
if
(
parentSpan
&&
parentSpan
!==
span
)
{
if
(
parentSpan
&&
parentSpan
!==
span
)
{
parentSpan
.
setAttribute
(
'http.route'
,
route
)
parentSpan
.
setAttribute
(
'http.route'
,
route
)
parentSpan
.
updateName
(
name
)
}
}
}
else
{
}
else
{
span
.
updateName
(
`
${
method
}
${
srcPage
}
`
)
span
.
updateName
(
`
${
method
}
${
srcPage
}
`
)
...
...
packages/next/src/build/templates/pages-api.ts
View file @
802073e7
...
@@ -153,6 +153,7 @@ export async function handler(
...
@@ -153,6 +153,7 @@ export async function handler(
// a platform-created HTTP span in adapter deployments).
// a platform-created HTTP span in adapter deployments).
if
(
parentSpan
&&
parentSpan
!==
span
)
{
if
(
parentSpan
&&
parentSpan
!==
span
)
{
parentSpan
.
setAttribute
(
'http.route'
,
route
)
parentSpan
.
setAttribute
(
'http.route'
,
route
)
parentSpan
.
updateName
(
name
)
}
}
}
else
{
}
else
{
span
.
updateName
(
`
${
method
}
${
srcPage
}
`
)
span
.
updateName
(
`
${
method
}
${
srcPage
}
`
)
...
...
packages/next/src/server/route-modules/pages/pages-handler.ts
View file @
802073e7
...
@@ -429,6 +429,7 @@ export const getHandler = ({
...
@@ -429,6 +429,7 @@ export const getHandler = ({
// deployments).
// deployments).
if (parentSpan && parentSpan !== span) {
if (parentSpan && parentSpan !== span) {
parentSpan.setAttribute('http.route', route)
parentSpan.setAttribute('http.route', route)
parentSpan.updateName(name)
}
}
} else {
} else {
span.updateName(`
$
{
method
}
$
{
srcPage
}
`)
span.updateName(`
$
{
method
}
$
{
srcPage
}
`)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment