---
title: ClickStack
sidebarTitle: ClickStack
logo: /images/integrations/clickhouse_icon.svg
description: Send OpenTelemetry traces to Langfuse and ClickStack for operational monitoring and continuous AI improvement.
---

# ClickStack

[ClickStack](https://clickhouse.com/clickstack) brings logs, metrics, and traces together for operational monitoring. [Langfuse](/docs/observability/overview) adds workflows for inspecting AI execution, evaluating outputs, improving prompts, and turning production examples into experiments. Both support OpenTelemetry, so you can send the same traces to both destinations.

**Start with Langfuse** [Sign up](/cloud)

## Why use both? [#why-use-both]

A slow or unsuccessful agent request raises different questions. An operations engineer might look for a failing dependency or SLO breach. An AI engineer might inspect the prompt, retrieved context, and tool calls. Shared trace context lets both teams investigate the same request in the tool they already use.

Langfuse connects production observations to a continuous improvement loop. ClickStack overlaps with the Observe and Monitor stages for operational work.

```mermaid
flowchart LR
    subgraph langfuse_loop["Langfuse: continuous AI improvement"]
        direction LR
        subgraph operational_overlap["Overlap with ClickStack: operational use cases"]
            direction LR
            observe["Observe"] --> monitor["Monitor"]
        end
        monitor --> datasets["Datasets"]
        datasets --> experiments["Experiments"]
        experiments --> prompts["Prompt management"]
        prompts --> observe
    end

    classDef loopBox fill:none,stroke:#888,stroke-width:2px
    classDef overlapBox fill:none,stroke:#ea580c,stroke-width:2px,stroke-dasharray:5 5
    class langfuse_loop loopBox
    class operational_overlap overlapBox
```

|                  | ClickStack                                                                              | Langfuse                                                                                              |
| ---------------- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Typical users    | Operations, SRE, platform, and application engineers                                    | AI engineers, product teams, and domain experts                                                       |
| Main questions   | Is the service healthy? What caused an error or latency spike? Are we meeting our SLOs? | Why did the agent behave this way? How can we improve its quality, cost, and latency?                 |
| Common workflows | Monitor logs, metrics, and traces; configure alerts; investigate incidents              | Inspect prompts and responses; evaluate outputs; curate datasets; run experiments; iterate on prompts |

Each team can set its own sampling and retention. An AI team may keep a broad history for evaluation; an operations team may keep what it needs for incidents. Neither product requires a particular split.

[Anthropic](https://clickhouse.com/blog/how-anthropic-is-using-clickhouse-to-scale-observability-for-ai-era) and [OpenAI](https://clickhouse.com/blog/why-openai-uses-clickhouse-for-petabyte-scale-observability) use ClickHouse for observability at scale.

## Recommended integration: export to both destinations [#recommended-integration]

Instrument your application with OpenTelemetry and export to a Langfuse project and your ClickStack environment.

```mermaid
flowchart LR
    app["Your application / AI agent"] --> otel["OpenTelemetry instrumentation"]
    otel -->|"Export traces"| obs["ClickStack"]
    otel -->|"Export traces"| langfuse["Langfuse"]
    obs --> ops["Operational monitoring and incident investigation"]
    langfuse --> improve["Evaluation and continuous AI improvement"]
```

Export from the application or through an OpenTelemetry Collector. Keep the original trace context on both paths so the same request is identifiable in each tool. Apply destination-specific sampling after the paths split if you need different coverage.

- **Langfuse:** [OpenTelemetry integration](/integrations/native/opentelemetry) for the ingestion endpoint and supported instrumentation. Include AI-specific attributes such as model inputs and outputs.
- **ClickStack:** [OpenTelemetry ingestion](https://clickhouse.com/docs/clickstack/ingesting-data/opentelemetry) and the [ingestion overview](https://clickhouse.com/docs/clickstack/ingesting-data/overview).
- **Shared trace context:** [Trace IDs and distributed tracing](/docs/observability/features/trace-ids-and-distributed-tracing).

Send a test request and confirm the same trace ID appears in both tools. Logs and metrics can continue to flow to ClickStack.

## Open source [#open-source]

[ClickStack](https://github.com/ClickHouse/ClickStack) is open source. It combines ClickHouse, OpenTelemetry, and the HyperDX interface.

## Monitor self-hosted Langfuse with ClickStack [#monitor-self-hosted-langfuse]

If you self-host Langfuse, you can also send stdout logs from `langfuse-web` and `langfuse-worker` to ClickStack. A node agent tails the container log files and a ClickStack collector writes them to a dedicated ClickHouse Cloud service, separate from `CLICKHOUSE_URL`. See [Export self-hosted Langfuse logs to ClickStack](/guides/export-self-hosted-langfuse-logs-to-clickstack) for the Helm values, collector setup, and Logs source.

## Roadmap [#roadmap]

We are working on deeper cross-linking and shared instrumentation so you can move between the two workflows without duplicating data.

Questions? [Contact support](/support) or [open a GitHub issue](https://github.com/langfuse/langfuse-docs/issues/new).

<!-- agent-instructions -->

---

## Agent Instructions

This page is part of the [Langfuse](https://langfuse.com) documentation, published as plain Markdown for AI agents. Every page is available as Markdown by appending `.md` to its URL, or by sending an `Accept: text/markdown` header. This page: `https://langfuse.com/integrations/clickhouse/observability.md`.

### Querying these docs

If the answer is not on this page, query the documentation instead of guessing:

- **Semantic search** across all Langfuse docs, returning an answer with the relevant pages and excerpts. Ask a specific, self-contained question:

  ```bash
  curl -sG "https://langfuse.com/api/search-docs" --data-urlencode "query=How do I trace a LangGraph agent?"
  ```

- **Index of every page**: <https://langfuse.com/llms.txt>, with per-section indexes [llms-docs.txt](https://langfuse.com/llms-docs.txt), [llms-integrations.txt](https://langfuse.com/llms-integrations.txt), and [llms-self-hosting.txt](https://langfuse.com/llms-self-hosting.txt).

### Before writing Langfuse code

- **Install the [Langfuse Agent Skill](https://langfuse.com/docs/api-and-data-platform/features/agent-skill).** It encodes Langfuse's own best practices for instrumentation, prompt management, and evaluation, and materially improves results.
- **Read [What does a good trace look like?](https://langfuse.com/docs/observability/best-practices.md)** before instrumenting an application.
- **Verify endpoints, parameters, and response fields** against the [API reference](https://api.reference.langfuse.com) instead of inferring them from code examples.
- **Use the [Langfuse CLI](https://langfuse.com/docs/api-and-data-platform/features/cli)** (`npx @langfuse/cli api <resource> <action>`) to read or write traces, prompts, datasets, and scores from the terminal.

Found an error in these docs? Please open an issue at <https://github.com/langfuse/langfuse-docs/issues>.
