Monitoring self-hosted Langfuse with OpenTelemetry

Self-hosted Langfuse is itself a service you have to watch. This page explains how to route its telemetry through your OpenTelemetry Collector, separate web and worker signals, and set the alerts worth running.

On this page

Why monitoring self-hosted Langfuse with OpenTelemetry matters

Once Langfuse is serving your engineering teams, it is a production dependency. The web and worker containers, PostgreSQL, ClickHouse, Redis or Valkey and your S3-compatible blob storage all have to be healthy at the same time, and a failure in any one of them rarely announces itself. It usually shows up as traces that never appear in the UI, prompts that load slowly, or evaluations that quietly stop running. Without telemetry from the platform itself, the team learns about these problems from the people who depend on them.

OpenTelemetry lets your team send metrics, traces and logs from the Langfuse containers and their data stores to a collector and backend that you run. The key decision is separation. Langfuse's OTLP endpoint at /api/public/otel is designed to receive traces from your applications and frameworks, so it records the LLM work your organization does. It is not the channel for watching Langfuse's own health. Keep the two paths distinct so that a platform outage does not also take down the telemetry you need to diagnose it, and so that application traces do not get mixed with infrastructure signals.

OpenTelemetry is a framework and set of tools for generating, exporting and collecting telemetry. It is not an observability backend. Storage, querying and dashboards are handled by separate systems that you choose and operate, so plan for both halves: a Collector pipeline that receives and forwards signals, and a backend that stores them and drives alerts. Before you build, confirm which signals each Langfuse component exposes in your deployment version, and decide who owns the collector, its credentials and its retention.

How platform telemetry flows from Langfuse to your backend

The flow starts inside your infrastructure, where Langfuse web and worker write to PostgreSQL, ClickHouse, Redis or Valkey and blob storage, and where container logs are written by the runtime. Platform telemetry leaves those components through an OpenTelemetry Collector, which can run beside the services as an agent or centrally as a gateway. The Collector then exports to the backend your organization chooses. Check that the trust boundary holds at every hop, that the Collector's exporters carry only the telemetry you intend to send, and that logs and metrics reach the backend through their own paths.

Platform telemetry leaves your infrastructure only through the Collector and log shipping path.

Which telemetry path fits which team

Direct application export fits teams that already instrument their own services or LLM applications with OpenTelemetry and want Langfuse to receive those traces directly. Langfuse accepts OTLP traces at its /api/public/otel endpoint, so the application's exporter points there and no extra service sits in the path. This path covers application traces only. It does not carry telemetry about Langfuse web and worker, so the platform still needs its own monitoring. Application owners usually manage this path, including their exporters and sampling.

  • Endpoint and credentials: Point the OTLP exporter at the /api/public/otel path on your Langfuse URL and supply the project credentials Langfuse issues. Confirm the header format in the Langfuse OpenTelemetry docs for your version.
  • Sampling in the SDK: Set the sampling ratio in each application's tracer provider so trace volume is controlled where the data starts.
  • Service names per application: Give each application a distinct service name so teams can filter traces in the UI.
  • Framework coverage: Confirm that LangChain, LlamaIndex, CrewAI, AutoGen or your framework emits the span attributes you need for the views your team uses.
  • Failure behavior: Check whether the SDK drops, retries or buffers spans when Langfuse is unreachable, and set limits so a platform outage cannot exhaust application memory.

Check the endpoint, sampling ratio and export failure behavior against the Langfuse version you run, since these details can change between releases.

Setting up OpenTelemetry for a self-hosted Langfuse

This sequence connects a self-hosted Langfuse to an OpenTelemetry Collector that you version, secure and monitor. The result is separate, labeled telemetry for the web and worker containers, container logs in their own pipeline, and alerts tested against known failures.

  1. Confirm the running Langfuse version and settings

    The platform owner records the Langfuse release tag running on the web and worker containers and confirms both use the same release. Then they check the self-hosting documentation for the release in use to see which telemetry settings it exposes, because not every version emits its own traces or metrics. Compare the tag with the latest release on the Langfuse releases page before you choose a version to pin. Done when you have a written record of the version, the image tags and the telemetry options that version supports, and the platform team has signed off on it.

  2. Choose and pin a Collector distribution

    The platform team selects the contrib distribution of the OpenTelemetry Collector, which the project publishes with signed artifacts, SHA256 checksums and SBOM files. Pin an exact release, such as v0.163.0 released on October 16, 2026, and record the image digest, not only the tag. Verify the checksum and signature before the image enters your registry, and check that the release notes do not change any component you depend on. Done when the Collector starts from the pinned image and its startup logs show the expected version.

  3. Configure receivers and the Langfuse export path

    Two flows need configuring. Application services send their traces to Langfuse at its OpenTelemetry endpoint, and the Collector receives the platform's own telemetry through an OTLP receiver and forwards it to your observability backend. Confirm the exact authentication header format for the Langfuse endpoint in the Langfuse OpenTelemetry documentation before you write the exporter block. Keep the two pipelines separate so that a problem in one does not hide the other. Done when a test span from a sample application appears in Langfuse and a test signal from the platform reaches your backend.

  4. Add processors and authentication to the pipeline

    Add a memory limiter and a batch processor to every pipeline so that the Collector sheds load predictably during bursts instead of running out of memory. Use an authenticator extension to require credentials on the receiver, for example OIDC, and an oauth2client extension to add credentials to outgoing exporter requests. Follow the Collector configuration best practices for network exposure and secrets. Check that each component's stability level in its README is acceptable for your use. Done when the configuration passes validation and a request without credentials to the receiver is rejected.

  5. Set distinct service names for web and worker

    Assign a separate service.name resource attribute to the web and worker containers, for example langfuse-web and langfuse-worker as illustrative names, so that dashboards and alerts can filter each component on its own. Confirm in the Langfuse documentation for your release whether the names come from environment settings or from the Collector resource processor. Avoid merging both components under one name, since a backlog in the worker would then be hidden inside the web latency figures. Done when a query for each name returns only that component's telemetry.

  6. Configure sampling for application traces

    Choose a sampling ratio for application traces that the team can afford to store and query, and apply it in the SDK or in a Collector sampling processor. Confirm the ratio is applied where you expect by comparing the number of traces sent with the number stored in the backend. Keep platform health signals, such as errors and the metrics used for alerts, outside the sampled set so that sampling does not remove the evidence you need during an incident. The ratio itself is a decision for your team, based on storage capacity and the investigations you need to support. Done when the stored trace count matches the configured ratio within the tolerance you set.

  7. Ship container logs through a separate pipeline

    Send web and worker container logs through a log agent or a Collector filelog receiver in its own pipeline, separate from the trace exporter. Log SDK and component maturity varies, so check the stability notes for the chosen receiver before you depend on it. Add labels that identify the container, the service name and the release tag so that log lines can be matched to traces. Done when a deliberate error line from the web container and one from the worker appear in your log store with the correct labels.

  8. Verify with test traffic and set alerts

    Send test traffic through an instrumented sample application, then check that the trace appears in Langfuse and that the platform metrics and logs for that period appear in your backend. Set alerts for failures that matter to operators, such as the web or worker containers restarting, ingestion errors in the logs, and loss of the database or ClickHouse connection. Agree the alert thresholds with the team that will receive the pages, since the right values depend on your traffic and staffing. Done when each alert has fired once in a controlled test and the on-call owner has confirmed they received it.

Which signals to collect from web, worker and data stores

A self-hosted Langfuse is several components that fail in different ways: the web and worker containers, PostgreSQL, ClickHouse, Redis or Valkey, and S3-compatible blob storage. The docs confirm the components and their roles, but they do not publish a complete signal catalog, so each card marks what your team must verify in its own environment before setting alerts.

Web request and error signals

Track HTTP status codes and latency at the Langfuse Web container, since it serves both the UI and the APIs that SDKs use to send traces. Watch 5xx rates and response times on the load balancer and inside the container, and compare them with the keep-alive and idle timeout settings on each side. Confirm which metrics your deployment exposes, because the docs do not list a full metrics endpoint.

Self-hosting docs

Worker queue and processing signals

Watch the worker's processing backlog, not only its CPU. Langfuse Worker handles asynchronous event processing, and the scaling guide recommends scaling workers on CPU load. Ingestion lag and error logs from the worker show whether events are being processed after the web container accepts them. Verify how your version exposes queue depth before you set a threshold.

Minimum per worker
2 CPU
Scaling guide

PostgreSQL and Redis or Valkey health

Alert on connection failures and saturation in PostgreSQL and Redis or Valkey. Both sit on the request path, and the scaling guide sets minimums of 2 CPU and 4 GiB for PostgreSQL and 1 CPU and 1.5 GiB for Redis or Valkey. Track connection counts, replication or persistence errors, memory use and disk space using the exporters or managed-service metrics your team already runs. Confirm the thresholds with your DBA.

ClickHouse health and disk headroom

Watch ClickHouse disk usage, merge activity and query errors. ClickHouse holds the analytical data, and the v3 to v4 guide advises about 3x disk headroom when backfilling historic data. Alert on free disk space well before it runs out, because a full disk stalls ingestion. Confirm which ClickHouse system tables and metrics your version provides, and set retention before you set disk thresholds.

v3 to v4 guide

Blob storage write and read errors

Alert on failed writes and reads against the S3-compatible bucket. Langfuse stores event payloads in blob storage before the worker processes them, so a storage error can hold back traces even when the web container looks healthy. Track error responses, request latency and socket errors from your storage provider, and check that the bucket's access policy still matches the credentials the containers use. Confirm which error codes your storage service reports.

Choosing a sampling ratio without losing ingestion errors

A sampling ratio decides how much of your application's OpenTelemetry trace traffic reaches your collector and, through it, your self-hosted Langfuse. Lower ratios cut ingestion load on Langfuse Web, the Langfuse Worker, ClickHouse and blob storage, but every trace you drop is also a request you cannot inspect later. The trade-off is between cost and visibility, and it should be set from your own request volume, trace size and retention needs rather than copied from another team. Confirm the current sampler options in the OpenTelemetry SDK for each language you run, since they differ by language and version.

The mistake to avoid is sampling away the signals that show the platform is failing. Ingestion errors, rejected requests, worker failures and queue backlogs are the events you most need when Langfuse stops showing traces, and they are often rare enough that a ratio applied to all telemetry drops them first. Keep platform health separate from application traces: scrape metrics from the Langfuse web and worker services and collect their container logs at full fidelity through your collector, so a sampling decision in an application never hides a failure in the pipeline itself. Where you must sample, use head-based ratios on application spans only and confirm with your collector configuration that error-status spans are not discarded by a processor.

Sampling also changes what Langfuse stores. Traces that are sampled out never produce observations, scores or cost records, so dashboards, evaluations and prompt experiments built on them will show lower counts and may look like a usage drop. Record the ratio in your team's documentation and tag dashboards with it, so a later change in sampling is not mistaken for a change in user behavior. Before you change the ratio on production traffic, test it in a non-production environment and compare Langfuse counts with the collector's own receive and export metrics, which the OpenTelemetry Collector documentation describes as the place to watch pipeline throughput.

Alerts worth setting on a self-hosted Langfuse

The alerts below cover the path a trace takes through a self-hosted Langfuse: the web tier that receives it, the worker that processes it, and the stores that hold it. Set each threshold from your own baseline measured over normal traffic, not from a number copied from another team.

Web unavailability

Alert when the Langfuse Web container stops answering its health endpoint or when your load balancer marks every web target unhealthy. Both the UI and the ingestion API run in this container, so an outage here stops SDKs from sending traces and stops engineers from reading them. Check that the alert fires on the public path through the load balancer as well as on the container itself, because the two can fail separately.

Self-hosting docs

Worker backlog

Alert when the ingestion queue keeps growing for longer than your normal processing delay. Langfuse Worker processes events asynchronously, so a stalled or undersized worker shows up as delayed traces rather than errors in the SDK. Compare queue length and worker CPU together: a busy worker with a growing queue points to capacity, while an idle worker with a growing queue points to a stuck dependency.

Scaling guide

Failed ingestion

Alert on a rising rate of failed or rejected ingestion requests from the web tier, and on OpenTelemetry exports that return errors from /api/public/otel. A clean web container can still drop data if the payload fails validation or a downstream write fails, so count errors per source project. Sudden drops in trace volume for a project that normally sends steady traffic are often the first visible sign of this failure.

Database and ClickHouse pressure

Alert on PostgreSQL connection saturation, and on ClickHouse disk usage and memory use approaching the limits you set for your deployment. The scaling guide lists minimum ClickHouse sizing of 2 CPU and 8 GiB, with at least 16 GiB of memory for larger deployments, so track headroom against the size you actually run. Disk alerts should leave enough room for a planned backfill, since the v3 to v4 upgrade guide advises about 3x ClickHouse disk headroom when backfilling historic data.

v3 to v4 guide

Blob storage write errors

Alert on repeated write failures to the S3-compatible bucket from the web and worker containers, and on a sustained rise in request latency to the bucket. Blob storage holds the raw event payloads that the worker reads, so failed writes can make traces appear to vanish after ingestion. Confirm with your storage vendor which error codes and request metrics it exposes, since these vary between S3-compatible systems.

Certificate and migration failures after upgrades

Set a short watch window after every Langfuse upgrade for container restarts, failed startup migrations and TLS or certificate errors on the SSO and OpenTelemetry endpoints. Updates within a major version apply database migrations automatically at startup, so a failed migration appears as a crash loop right after deploy. Ask your team to confirm the upgrade guide's prerequisites, such as the minimum ClickHouse, PostgreSQL and Redis versions, before the window opens.

Minimum for v4
PostgreSQL 15

Monitoring Langfuse with OpenTelemetry: common questions

What does it cost to monitor a self-hosted Langfuse with OpenTelemetry?

The software is free to use, so the cost is labor and the infrastructure that runs your collector and monitoring backend. The Collector is Apache-2.0 licensed, so there is no license fee for it, but you pay for the compute to run it, the storage for telemetry, and the engineering time to configure pipelines, dashboards and alerts. Costs rise with trace volume, the number of retained metrics and logs, and how many environments you monitor. Ask any partner for a fixed-scope quote that lists the Collector deployment, the backend you choose, dashboards, alert rules and the retest after upgrades, so that one-time build work and recurring run costs are separated.

How long does a typical Langfuse monitoring setup take?

Duration depends on how many components need coverage and how much of the stack you already monitor. A basic setup that exports traces from the web and worker services to an existing collector is a smaller job than a full build that adds container log shipping, dashboards and tuned alerts across the Langfuse dependencies. The main drivers are whether a Collector and backend already exist, how your identity and network controls affect the collector endpoint, and how many teams need access to dashboards. Confirm the timeline against a written scope rather than a generic estimate.

What does our team need to provide before the work starts?

Plan to provide access and decisions rather than code. The main inputs are:

  • A running Langfuse deployment with access to the web and worker containers and their logs.
  • An existing OpenTelemetry Collector or a decision to deploy one, plus the backend that will store metrics, traces and logs.
  • Your alerting channels, on-call rules and the owners who receive pages.
  • Network paths from the Collector to the backend, and any authentication the Collector needs to send data.
  • Sign-off on sampling ratios and retention periods.

The Langfuse OpenTelemetry docs and the Collector configuration docs list the settings you should review.

Can our own platform team monitor Langfuse in-house?

Yes, if your team already runs a Collector and a metrics or logs backend and has someone who owns alert tuning. The work is mostly configuration: exporting traces, setting service names for the web and worker containers, shipping logs separately and writing alert rules. What tends to slow internal teams down is the first Collector deployment, the authentication setup for receivers and exporters, and keeping the configuration current across Collector releases. Decide early who owns the configuration, who reviews changes, and who tests alerts after each Langfuse upgrade.

Does Langfuse's OTLP endpoint monitor the platform itself?

No. The /api/public/otel endpoint accepts OpenTelemetry traces from your applications so they appear in Langfuse as LLM traces. It is an ingestion path for application telemetry, not a health monitor for the Langfuse containers, databases or queues. To observe the platform, you export telemetry from the Langfuse web and worker services to your own Collector and monitoring backend, then alert on container health, error rates and resource use. Treat Langfuse's own UI and its trace data as one thing to monitor, and your infrastructure telemetry as a separate pipeline.

Which alerts should we set up first for a self-hosted Langfuse?

Start with alerts that show whether users and ingestion are affected:

  • Web and worker containers restarting or failing health checks.
  • Sustained high error rates on the web service and gateway timeouts.
  • Worker CPU load rising for a long period, since Langfuse recommends scaling workers on CPU load.
  • Memory pressure on web, worker and ClickHouse containers.
  • Disk usage trending toward full on ClickHouse and PostgreSQL.

Tune thresholds to your own baseline and confirm the list against the scaling guide and your environment before you page anyone.

How should we set the sampling ratio for Langfuse telemetry?

Set the sampling ratio by balancing trace coverage against storage and cost. Lower sampling reduces the volume your Collector and backend store, but it can hide rare failures, so keep full coverage for error traces where possible. Review the sampling settings in the OpenTelemetry Collector configuration docs and confirm which signals your backend charges for. Document the chosen ratio, the reason for it, and the date you will review it, because trace volume grows with usage and Langfuse upgrades can change what gets emitted.

How DeployOpen scopes and supports Langfuse monitoring

DeployOpen starts with a written scope that answers the questions this topic raises before any collector config is written: which Langfuse web and worker containers emit telemetry, which PostgreSQL, ClickHouse, Redis or Valkey and S3-compatible storage endpoints get checked, where the OpenTelemetry Collector runs (agent next to the services or gateway for several sources), which backend stores the traces, metrics and logs, and which alerts page a person. The scope also records the sampling ratio decision, the service names for web and worker, how container logs are shipped separately, and who owns each alert. Ask for this document to name the environments, the Collector version you will standardize on, and the acceptance checks, so the quote follows from defined work.

Implementation happens inside your cloud accounts, data centers or air-gapped network. DeployOpen configures the Collector receivers, processors and exporters, the authenticator extensions where your policy requires authenticated telemetry, and the dashboards and alert rules in the tooling you already run. Verification is part of the deliverable: we confirm that the web and worker service names appear as separate sources, that a deliberately induced slow query or a stopped worker raises the expected alert, and that logs and traces can be correlated during an incident. You receive the configuration in version control, a runbook for each alert, and a record of the checks that passed. Nothing is considered finished until your operators have seen those signals fire in a test.

Langfuse and the Collector both change over time, so monitoring needs a maintenance plan. DeployOpen offers retainer support to review each Langfuse minor and major release, adjust the Collector pipeline when component stability levels or configuration change, and retest alerts after upgrades that alter metric names. Retainers are agreed in writing with the same scope discipline as the initial build. DeployOpen is a Chainscore Labs company and does not publish a price list. Cost depends on the number of environments, the observability backend you use, the alert count and the support hours you need, and a quote follows from the written scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.