Skip to content

fix(logs): name display fields and real span counts in trace projection warnings - #9690

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/trace-projection-log-labels
Nov 5, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/trace-projection-log-labels

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Log display projection runs each envelope value (error, message, final output, block dumps) as a synthetic span alongside the real spans; the budget-overrun warning counted those as spans, so running out on the trailing block dumps read as "withholding the remaining spans" when every real span was kept
  • New displayFieldsBySpanId option on projectTraceSpansForSecrets: the budget warning now reports real retainedSpanCount / withheldSpanCount and lists withheldDisplayFields separately; the message says "remaining content"
  • A display field that fails its own sanitize is logged as displayField: '<key>' instead of a synthetic span id with field: 'output' (block outputs as blockOutput:<blockId>)
  • Structure-fallback warnings ("exceeded projection limits", "could not be safely traversed") now carry the run ids and phase
  • The post-save invariant check stamps phase: 'write' explicitly instead of deriving it from its read-only projection context
  • Log payloads only: projection output, budgets, and the save path's per-field payload are unchanged

Type of Change

  • Bug fix

Testing

  • trace-store.test.ts, trace-secret-projection.test.ts, logging-session.test.ts (129 passing)
  • New assertions shown red by reverting each guard: old span counting fails the block-dump budget test; dropping the display-field label fails the envelope ref test
  • Biome on changed files; CI runs type-check, audits, and the full suite

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 5, 2026 1:41am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

This PR makes trace projection warnings distinguish real spans from display fields.

  • Projection warnings name omitted display fields and count real spans.
  • Fallback warnings identify the run and whether it was read or written.

No actionable issues were found. Tests were inspected but not run during this review.

Reviews (1) · Last reviewed commit: "fix(logs): name display fields and real ..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 550fe32 into staging Nov 5, 2026
60 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/trace-projection-log-labels branch November 5, 2026 01:47

This branch was previously deployed

1 inactive deployment
Preview — 944d9d57 Deployed Nov 5, 2026 by vercel[bot]
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