Skip to content

observe: add cost-aware trace sampling#526

Merged
rickcrawford merged 1 commit into
mainfrom
codex/wor-1214-trace-sampling
Jun 18, 2026
Merged

observe: add cost-aware trace sampling#526
rickcrawford merged 1 commit into
mainfrom
codex/wor-1214-trace-sampling

Conversation

@rickcrawford

Copy link
Copy Markdown
Contributor

Summary

  • Wire proxy.observability.telemetry into runtime startup so the OTLP trace layer is installed with the global subscriber.
  • Add source-side parent-based ratio trace sampling with span-end keep overrides for errors, over-budget spans, and slow spans.
  • Expose keep_over_budget_usd and keep_slower_than_secs in config parsing, JSON schema, docs, examples, and generated LLM docs.

Validation

  • cargo test -p sbproxy-observe telemetry::tests --locked
  • cargo test -p sbproxy-observe --locked
  • cargo test -p sbproxy-config --locked
  • cargo test -p sbproxy --locked
  • cargo fmt --all --check
  • git diff --check
  • ./scripts/check-config-schema.sh
  • ./scripts/regen-llms-full.sh --check
  • cargo clippy -p sbproxy-observe -p sbproxy-config -p sbproxy --all-targets --locked -- -D warnings

NOTICE

No new third-party libraries were added; NOTICE is unchanged.

Linear: WOR-1214

@rickcrawford rickcrawford force-pushed the codex/wor-1214-trace-sampling branch from c37810b to 3a92fc4 Compare June 18, 2026 11:50
@rickcrawford rickcrawford merged commit 586e8f7 into main Jun 18, 2026
9 checks passed
@rickcrawford rickcrawford deleted the codex/wor-1214-trace-sampling branch June 18, 2026 12:04
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