Unverified Commit 802073e7 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

[otel] set parent span name (#90840)

parent 2ae779cf
...@@ -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/)
......
...@@ -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}`)
......
...@@ -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}`)
......
...@@ -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}`)
......
...@@ -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}`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment