fix(langfuse): exclude http wrapper spans with empty mcp_method

This commit is contained in:
2026-07-08 12:24:57 +05:30
parent 1201486e6a
commit 70ed0db700
+2 -2
View File
@@ -68,8 +68,8 @@ export function initializeLangfuseTransport(): void {
// Only export tool-call spans, skip health checks and protocol noise // Only export tool-call spans, skip health checks and protocol noise
shouldExportSpan: (span) => { shouldExportSpan: (span) => {
const mcpMethod = span.otelSpan.attributes["mcp_method"]; const mcpMethod = span.otelSpan.attributes["mcp_method"];
if (mcpMethod === "tools/call") return true; if (mcpMethod === undefined) return true;
return !mcpMethod; return mcpMethod === "tools/call";
}, },
}), }),
], ],