🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(otel): update trace name only for root spans (#7061)
Hassieb Pakzad05e15c9f5376
diff --git a/web/src/__tests__/server/api/otel/otelMapping.servertest.ts b/web/src/__tests__/server/api/otel/otelMapping.servertest.tsindex 6b173e9b9d..d0d46fa1c5 100644--- a/web/src/__tests__/server/api/otel/otelMapping.servertest.ts+++ b/web/src/__tests__/server/api/otel/otelMapping.servertest.ts@@ -459,7 +459,7 @@ describe("OTel Resource Span Mapping", () => {expect(traceEvent.body).toMatchObject({id: "95f3b926c7d009925bcb5dbc27311120",timestamp: "2025-05-05T13:42:33.936Z",- name: "my-span-with-custom-trace-id",+ name: undefined,environment: "production",});});diff --git a/web/src/features/otel/server/index.ts b/web/src/features/otel/server/index.tsindex 68591cbae6..19f23ed96b 100644--- a/web/src/features/otel/server/index.ts+++ b/web/src/features/otel/server/index.ts@@ -656,7 +656,9 @@ export const convertOtelSpanToIngestionEvent = (timestamp: startTimeISO,name:attributes[LangfuseOtelSpanAttributes.TRACE_NAME] ??- (is_root_span ? extractName(span.name, attributes) : undefined),+ (!parentObservationId+ ? extractName(span.name, attributes)+ : undefined),metadata: {...resourceAttributeMetadata,...extractMetadata(attributes, "trace"),