Skip to content

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

fix(otel): set trace io from root span (#7127)

Hassieb Pakzad96ec24aad8c9
diff --git a/web/src/features/otel/server/index.ts b/web/src/features/otel/server/index.ts
index 19f23ed96b..b6060e606a 100644
--- a/web/src/features/otel/server/index.ts
+++ b/web/src/features/otel/server/index.ts
@@ -134,11 +134,11 @@ const extractInputAndOutput = (
// Langfuse
input =
- domain === "trace"
+ domain === "trace" && attributes[LangfuseOtelSpanAttributes.TRACE_INPUT]
? attributes[LangfuseOtelSpanAttributes.TRACE_INPUT]
: attributes[LangfuseOtelSpanAttributes.OBSERVATION_INPUT];
output =
- domain === "trace"
+ domain === "trace" && attributes[LangfuseOtelSpanAttributes.TRACE_OUTPUT]
? attributes[LangfuseOtelSpanAttributes.TRACE_OUTPUT]
: attributes[LangfuseOtelSpanAttributes.OBSERVATION_OUTPUT];