Skip to content

Preserve Langfuse trace context and exact costs across exporter upgrades - #266

Merged
justsml merged 3 commits into
mainfrom
review/langfuse-context-accounting
Oct 15, 2026
Merged

justsml merged 3 commits into
mainfrom
review/langfuse-context-accounting

Conversation

@justsml

@justsml justsml commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Keep aggregate model-generation observations as the single billing source for each call. Nested inference observations retain diagnostics as metadata without duplicating usage or provider cost. Preserve exact observation input/output, events, canonical root correlation, runtime session identity, and child tags.

Pin the patched Mastra Langfuse adapter to 1.5.13 and regenerate the lockfile against current main. Preserve main's SDK 5.13.1 media compatibility patch and immutable retained-evidence contract. A separate mechanical formatting commit clears five inherited CI errors in four files, including the development seed fixture.

Validation with Node 24.21.0 and pnpm 12.8.1:

  • Fresh frozen-lockfile install verified patch application. Lifecycle scripts were initially disabled; the allowed node-pty native build was then run and its import verified for the production build.
  • 38 accounting, telemetry, media, retained-import, replacement, and suspended-usage integration tests passed using local fixtures.
  • 42 Langfuse/eval gate tests, typecheck, production build, and full Biome check passed. The final post-format production build also passed.
  • Dependency audit still fails: 15 findings, identical to current main (1 critical, 6 high, 7 moderate, 1 low), with no introduced advisory IDs. No audit suppression was added.

No live provider calls or live Langfuse delivery/billing verification were performed.

@justsml
justsml marked this pull request as ready for review October 15, 2026 14:40
@justsml
justsml merged commit f2314f1 into main Oct 15, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant