POST /v1/signals/{id}/explain takes no request body. Root-cause analysis runs entirely against Dunetrace's own stored events — no external tracing system involved, with or without Langfuse configured.What connecting Langfuse gets you
- Langfuse's own evaluation results, pulled into the same dashboard as Dunetrace's structural and semantic signals, correlated to the same runs via
trace_id - One alert channel — no switching tools mid-incident to check what Langfuse scored on a given run
- Click-through to the original Langfuse evaluation for deeper inspection
Prerequisites
- Dunetrace backend running (
docker compose up -d) - Langfuse account (cloud or self-hosted) with a project and API keys
Connect the integration
POST /v1/orgs/integrations/langfuse
Authorization: Bearer dt_live_...
Content-Type: application/json
{
"endpoint_url": "https://cloud.langfuse.com",
"public_key": "pk-lf-...",
"secret_key": "sk-lf-...",
"poll_interval_secs": 60
}
Credentials are encrypted at rest and never appear in any API response. GET/DELETE /v1/orgs/integrations/langfuse to check status or disconnect.
How it works
- A background poller checks Langfuse for new evaluation results every
poll_interval_secs(default 60s) - Each result is correlated to a Dunetrace run via
trace_id - Matched results are written into the same signals table Dunetrace's own detectors use, tagged
source: "langfuse" - If Langfuse is unreachable, the poller logs and retries — it never crashes, and a >30 minute outage writes an internal (shadow-only) operational signal rather than failing silently
Root-cause analysis (native, independent of this integration)
POST /v1/signals/{signal_id}/explain
Authorization: Bearer <your-key>
No request body. Returns root_cause, fix_category (dunetrace_native with a suggested_policy, or customer_code with fix_content/fix_patch), fix_type, and apply_blocked. Requires ANTHROPIC_API_KEY or OPENAI_API_KEY in .env — nothing Langfuse-specific.
fix_type | Meaning | Apply path |
|---|---|---|
policy | Runtime guardrail Dunetrace can enforce itself (TOOL_LOOP, RETRY_STORM, etc.) | Apply as policy — POST /v1/policies, no external system involved |
prompt_addition | One sentence to append to the system prompt | No automated apply path — copy manually |
code_change | Code or infra fix (CONTEXT_BLOAT, SLOW_STEP, etc.) | Open PR on GitHub ↗ — POST /v1/signals/{id}/open-pr, draft PR with a real diff |
no_auto_apply | Security signal (PROMPT_INJECTION_SIGNAL) | Never auto-apply — review manually |
Track fix effectiveness
GET /v1/signals/{signal_id}/fix-status
Authorization: Bearer <your-key>
Returns a verdict: verified (≥10 runs after fix, 0 recurrences), likely_fixed (≥5 runs, 0 recurrences), still_occurring, or insufficient_data.