feat(pilot): emit per-review Langfuse traces #11
Reference in New Issue
Block a user
Delete Branch "feat/langfuse-tracing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ships token spend, latency and equivalent cost for every review to the self-hosted Langfuse.
langfuse_trace.pyis stdlib-only and emits via the public ingestion API. Traces split intoollamaandclaudeenvironments keyed off the bare model name, not the provider — both paths go through the same headroom proxy, so the provider prefix says nothing about which spend story a review belongs to. The pilot's own path bills $0, so reported cost is the equivalent price fromcost_model.PRICES.ai_review.pycalls_emit_langfuseon both token-spending exit paths (normal post and salvage). Import and emission are wrapped in a blanket except: with noLANGFUSE_HOSTor key pair it is a silent no-op, and telemetry failure never fails a review.Why now: these files were previously deployed only by way of the image build's
COPY . /app, so a clean checkout would have silently dropped tracing.23 tests pass. No secrets in the diff — docs carry
pk-lf-…/sk-lf-…placeholders, tests usepk-lf-testfixtures.🤖 Generated with Claude Code