How it works
- Your agent sends traces to Langfuse as it does today.
- When a Coval simulation finishes, Coval fetches the traces that fall inside the simulation’s time window from Langfuse’s Public API.
- Langfuse observations are mapped to OpenTelemetry spans and written to the same ClickHouse-backed trace store that native OTLP ingestion uses.
- The trace viewer, trace metrics, and transition heatmap work against the imported spans exactly as they do for native OTLP traces.
service.name = langfuse so they are easy to distinguish in the trace viewer.
Prerequisites
- A Coval account (sign up)
- A Langfuse project with at least one completed trace
- Langfuse Public Key and Secret Key from your Langfuse project settings
Connect Langfuse
- Open Settings → Integrations in Coval.
- Expand the Langfuse Integration panel.
- Paste your Public Key and Secret Key.
- Set Host if you self-host Langfuse. Leave it on the default
https://us.cloud.langfuse.comfor Langfuse Cloud. - Save.
Coval stores the secret key server-side and never returns it to the browser. To rotate the key, use the Replace key button in the credentials card.
Correlation
To tie traces back to the right Coval simulation, Coval first tries to match Langfuse tracemetadata on any of:
simulation_output_idsession_idcoval_simulation_output_id
simulation.start_time → simulation.end_time) and imports every trace in that window. For agents that handle more than one conversation at a time, set one of the metadata keys above to the simulation output ID so imports stay precise.
Verify traces landed
After a simulation finishes, open the result in Coval and click View Traces. Imported spans appear withservice.name = langfuse and the original Langfuse attributes preserved under langfuse.* keys. OTel GenAI semantic-convention attributes (gen_ai.request.model, gen_ai.usage.*) are emitted for LLM generations so trace-based metrics work out-of-the-box.
Limits
- Import runs once per simulation, synchronously, with a 30-second budget.
- Up to 500 traces per simulation time window are imported (100/page × 5 pages).
- If a simulation already has native OTLP traces, the import is skipped to avoid duplicate spans.
Troubleshooting
| Symptom | Likely cause |
|---|---|
| No spans in the viewer, correct time window | Check the Langfuse Integration card in Settings. If the Configured chip is missing, re-save the credentials. |
| Spans appear but don’t match the simulation | Set metadata.simulation_output_id on your traces (see Correlation above). |
401 Unauthorized in logs | Keys were rotated in Langfuse. Click Replace key in Settings. |
See also
- OpenTelemetry Traces — push traces directly to Coval.
- Coval Wizard (Beta) — auto-instrument Pipecat/LiveKit/Vapi agents.

