Skip to content

Mark deploy traces for complete backend retention - #5318

Merged
benbjohnson merged 1 commit into
masterfrom
benbjohnson/retain-deploy-traces
Oct 23, 2026
Merged

benbjohnson merged 1 commit into
masterfrom
benbjohnson/retain-deploy-traces

Conversation

@benbjohnson

@benbjohnson benbjohnson commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Mark the deploy command context with W3C baggage flyctl.deploy=true, and copy that marker onto every CLI span as it starts. Existing HTTP baggage propagation carries it to flaps and flyd, whose baggage-copy span processors already annotate their spans. The marker is attached before cmd.deploy starts and remains on child contexts for the command's entire lifetime.

With matching sampler routing, marked spans bypass tail sampling individually, including late-arriving spans after the 30-second decision window or cache eviction. Unrelated commands remain unmarked. No dependency changes.

Validation: the full internal/tracing package passes; regression coverage verifies W3C propagation, same trace ID across a simulated backend hop, marked spans with start timestamps older than 30 seconds, and unmarked unrelated spans. The deploy command package compiles. git diff --check passed.

Rollout: deploy sampler routing first, then CLI ingress preservation, then publish this flyctl release. Existing CLI versions do not emit the marker. Existing backend noise filtering and transport limits remain in effect.

Related rollout PRs: https://github.com/superfly/fly-traces-tail-sampler/pull/3, https://github.com/superfly/fly-otel-collector/pull/19.

Lines: code +32/-0, docs +0/-0, tests +47/-0.

Complete rollout order: sampler routing → ingress preservation → flyctl release.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T19:18:39.402738Z 72f74ec PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@benbjohnson
benbjohnson merged commit a463acd into master Oct 23, 2026
25 of 26 checks passed
@benbjohnson
benbjohnson deleted the benbjohnson/retain-deploy-traces branch October 23, 2026 19:34
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