You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Integrations that call withActiveSpan on an ignored child span drop its whole subtree #25389
withActiveSpan(span, cb) makes any span active, including an ignored child (ignoreSpans). Spans started inside cb then inherit its unsampled flag, so everything under it is dropped. Core's startSpan and the OTel tracer avoid this by never activating an ignored child (trace.ts:85, opentelemetry/src/tracer.ts:95), but code that calls withActiveSpan with its own span skips that check.
In server-utils only tracing-channel.ts:326, prisma/orchestrion.ts:142 and now the LangChain handler (#25364) check spanIsIgnored(span) && getRootSpan(span) !== span, each with its own copy. Callers that run code under a stored span without it include ai/flue/index.ts:70,74, vercel-ai-orchestrion-subscriber.ts:499,621, ai/pi-durable/index.ts:242, ai/typesafe/index.ts:154, graphql/resolvers.ts:129 and kafkajs/consumer.ts:53,79. With an ignoreSpans rule matching e.g. execute_tool, the model call made inside a Flue tool would be lost. Found by reading the code, not reproduced yet.
Proposed fix: one exported core helper that runs cb under the span unless it is an ignored child (prisma's runUnderSpan already does this), and move these callers to it.
Activity
linear-code commentedon Oct 15, 2026
JS-3939