How to integrate OpenTelemetry tracing in .NET apps with Langfuse for AI evaluation

A development team building AI-powered products evaluated several observability platforms — including Arize Phoenix, Microsoft Foundry, and Langfuse — to monitor and improve their AI agents. They shortlisted Langfuse and Microsoft Foundry, choosing to document the Langfuse integration first. Because Langfuse lacks an official OpenTelemetry SDK, the team leveraged the OpenTelemetry community's emerging Generative AI semantic conventions alongside standard .NET OpenTelemetry SDKs to pipe telemetry data into Langfuse. The integration requires configuring a dual OTLP exporter setup — one targeting the Aspire dashboard and another pointing to the Langfuse OTLP endpoint — along with Base64-encoded API key authentication passed via HTTP headers. Environment variables are managed through the .NET Aspire app host to wire up endpoints and credentials without hardcoding sensitive values.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in