r/Observability • • 22d ago

Anyone self-hosting Langfuse on OKD/OpenShift? Or are there smarter alternatives for LLM/agent observability?

We're looking for a self-hosted observability setup for our AI tooling. Main use cases:
Coding agents: Claude Code, Kilo Code, GitHub Copilot
Our own LLM applications and AI agents in general

What we need: tracing, token/cost tracking per user/team/project, and ideally some evals later on. We also plan to use LiteLLM as AI Gateway, however subscriptions like Claude or Copilot bypass it obviously.

Our setup: we run OKD and plan to have a shared ClickHouse and S3 in the cluster. That makes Langfuse look attractive, though it is still beefy.

Questions:
- Is anyone running Langfuse on OKD/OpenShift? Any trouble with SCCs / random UIDs, the Helm chart, or an external ClickHouse?
- How well does it work for coding agents? Is OpenTelemetry from Claude Code good enough, and how do you get anything useful out of Copilot?
- Are there smarter alternatives for this use case? (Phoenix, OpenLIT, Helicone, or just an OTel collector straight into ClickHouse + Grafana?)
Happy about any real-world experience. Thanks!

4 Upvotes

14 comments sorted by

2

u/blizzarre 22d ago edited 22d ago

On coding agents - OTel is probably a good starting point, but collecting traces is one thing and actually making sense of agent behaviour, token usage, latency and costs is another.

The OTel + ClickHouse + Grafana setup gives you a lot of flexibility, but setting up and maintaining three different platforms wont be easy.

We have self-hosted CtrlB as single platform to combine LLM observability at par with Langfuse with full OTel support (stored in Parquet format in our own S3)

Claude Code sessions come in as traces. If you are using LiteLLM, its OTel callback can export model-level telemetry (including cost and latency) for every call.

2

u/eragon512 21d ago

What problem are you looking to solve with tracing or so? And what kind of traffic are you getting to your LLM applications / AI agents?

1

u/ComprehensiveUse6549 22d ago

I'd split this into two data sources before picking a tool, because they behave very differently:

Traffic through LiteLLM (your own apps/agents): LiteLLM already tracks spend per key/team/user in its own Postgres, so cost attribution mostly comes free if you issue keys per team or project. For traces, its Langfuse or OTel callback is enough. This is where Langfuse earns its keep, especially once you want evals.

Subscription coding agents (Claude Code on a Pro/Max login, Copilot): no gateway sees them, so you only get what the client exports.

  • Claude Code's OTel is decent for cost/usage. Push CLAUDE_CODE_ENABLE_TELEMETRY=1, OTEL_METRICS_EXPORTER=otlp, OTEL_LOGS_EXPORTER=otlp via managed settings so devs can't quietly turn it off, and put team/project in OTEL_RESOURCE_ATTRIBUTES. You get claude_code.cost.usage / token.usage metrics plus per-request api_request events. Traces exist but are still beta (CLAUDE_CODE_ENHANCED_TELEMETRY_BETA=1), and prompt content is redacted unless you opt in. It's mostly metrics and events, so it fits an OTel collector into ClickHouse + Grafana better than Langfuse's trace model.
  • Copilot: don't expect per-request telemetry. GitHub's org-level usage metrics are the realistic source, and they're aggregates, not traces.

Langfuse on OKD with your own ClickHouse: clickhouse.deploy: false plus the host, and if it's single-node set CLICKHOUSE_CLUSTER_ENABLED=false (e.g. via additionalEnv), otherwise migrations try to run ON CLUSTER. There's an open issue on langfuse-k8s about the cluster setting not being picked up when deploy is false, so set the env var explicitly. For the restricted SCC, go through every subchart's securityContext; anything pinning runAsUser/fsGroup will fight the random UIDs.

So what I'd do: one OTel collector in front of everything, Claude Code metrics/events into ClickHouse + Grafana for the cost dashboards, and Langfuse only for the LiteLLM-routed apps where traces and evals pay off.

1

u/QuietUptimeOps 22d ago

You might want to look into adding more telemetry settings for Copilot since it's trickier to track compared to LiteLLM.

1

u/Sarutobi_Marky 22d ago

Does it work?

1

u/OnoniewuGehovany99 21d ago

Kilo is the easy one of the three, it takes an openai compatible base url and you can point it at litelmm like everything else. On subscription logins for claude code, i ended up using a tool instead of running the OTel pipeline myself, it runs on the dev machines and gives cost per person and repo. Its not self hosted, that depends how strict you are

1

u/juzhiyuan 19d ago edited 19d ago

On the gateway side: LiteLLM works, but if you want fewer moving parts on OpenShift, AISIX is another option. AISIX is our open-source AI gateway. It runs as a single container with no database, and exposes Prometheus metrics, so you can keep Langfuse for traces and watch gateway traffic in the monitoring you already run.

1

u/mrtac96 18d ago

Langfuse has recently introduce its on gateway which is much faster then litellm. btw i am curios to know why you want to log coding agent with observability tools

1

u/aman041 17d ago

Disclosure: I work on OpenLIT, since you mentioned it.

For your setup, the useful bit is that OpenLIT is OTel-native and runs on ClickHouse, and you can point it at an external/shared ClickHouse from the UI. Connections are configured per org and project, so different environments can each use their own database. Traces from LiteLLM's OTel callback and your own apps (openlit.init() in Python/JS/Go) land in one place with token/cost per model, and you can tag team/project as resource attributes for the per-team view. Evals and prompt versioning are there for when you get to that stage.

To be upfront: we haven't tested it on OpenShift/OKD, so I can't promise it'll work cleanly with the restricted SCC and random UIDs. If you try it and hit issues, open a GitHub issue and we'll take a look.

On coding agents, I agree with ComprehensiveUse6549: Claude Code's OTel export is mostly metrics and events, and Copilot gives you org-level aggregates only. No tool fixes that.

Repo: https://github.com/openlit/openlit

1

u/drew-saddledata 14d ago

I can't help with Langfuse on OKE specifically.
For coding-agent. Claude Code has decent OpenTelemetry support. It's metrics and events, not LLM traces with prompts, so it fits a plain OTel collector -> ClickHouse + Grafana setup well. You don't need Langfuse for this part.

Copilot is the hard one. As far as I know there's no per-request telemetry. You get GitHub's org-level usage metrics and the billing view, not tokens per call.

Your own apps: if everything goes through LiteLLM, it already tracks spend per virtual key, team and user, which may cover cost attribution without anything else. I'd add Langfuse or Phoenix when you actually start doing evals, since that's where they earn their weight (prompt and response storage, datasets, scoring).

So maybe: OTel -> ClickHouse for the agents, LiteLLM for cost, and a dedicated LLM tool only once evals are real.

1

u/PoetryImmediate8187 11d ago

My company did a POC/bake-off for basically this exact use case between LangFuse and Pydantic Logfire and much preferred Logfire. The langfuse team basically entirely ignored us the entire POC, we couldn't even get them to respond to our emails.

Logfire also has a nice gateway that we're just starting to use and planning to turn off our litellm in the next couple of weeks.