Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

refactor(otel): gate Flue input/output extraction on instrumentation scope (#14337)

Jannik Maierhöferad32debe3610
diff --git a/packages/shared/src/server/otel/OtelIngestionProcessor.ts b/packages/shared/src/server/otel/OtelIngestionProcessor.ts
index 75f7c9f4cc..04351b3ee4 100644
--- a/packages/shared/src/server/otel/OtelIngestionProcessor.ts
+++ b/packages/shared/src/server/otel/OtelIngestionProcessor.ts
@@ -1683,9 +1683,10 @@ export class OtelIngestionProcessor {
// Flue (https://flueframework.com)
// The @flue/opentelemetry adapter emits content under flue.* attributes that
// differ by span type (model turn, tool call, delegated task, workflow,
- // operation). Pick the input/output pair for whichever span this is. The
- // flue.* namespace is unique, so attribute presence is a safe gate.
- {
+ // operation). Gate on the instrumentation scope (like the Genkit and Vercel
+ // AI SDK handlers above) so a foreign span that happens to carry a flue.*
+ // attribute is never affected.
+ if (instrumentationScopeName === "@flue/opentelemetry") {
const flueInput =
attributes["flue.turn.input"] ??
attributes["flue.tool.arguments"] ??