Skip to content

Latency telemetry: preserve real histogram samples - #440

Merged
proerror77 merged 6 commits into
mainfrom
codex/latency-real-samples-397
Jul 29, 2026
Merged

proerror77 merged 6 commits into
mainfrom
codex/latency-real-samples-397

Conversation

@proerror77

Copy link
Copy Markdown
Owner

Change contract

Export each real latency sample to Prometheus exactly once at its production recording boundary, without reconstructing distributions from rolling summaries.

Closes #397

Out of scope

Dependency or merge order

Stacked on #438. Merge order: #438, then this PR. After #438 merges, retarget this PR to main before merge.

Focused validation

  • rustfmt --edition 2021 --config skip_children=true --check infra-services/core/metrics/src/lib.rs apps/live/src/helpers/metrics.rs market-core/engine/src/dataflow/ingestion.rs market-core/engine/src/lib.rs market-core/runtime/src/system_builder.rs
  • cargo test -p hft-infra-metrics
  • cargo test -p hft-engine
  • cargo test -p hft-engine --features metrics
  • cargo clippy -p hft-engine --features metrics -- -D warnings
  • cargo check -p hft-live --features metrics
  • cargo check -p hft-runtime --features metrics
  • Spec and standards re-review: no remaining findings

The focused skewed-sample test asserts count, sum, bucket shape, and no replay after periodic gauge sync.

Rollout / rollback impact

Metrics-correctness change only. No execution enablement, risk-policy change, or deployment action. Live remains disabled. Roll back by reverting commit 6160b150a9a75db404dead258f917ddfcf71082f.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@proerror77, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a135216-491d-4f46-b6b1-2e68e1abc120

📥 Commits

Reviewing files that changed from the base of the PR and between 7aee974 and 417219c.

📒 Files selected for processing (6)
  • rust_hft/apps/live/src/helpers/metrics.rs
  • rust_hft/infra-services/core/metrics/src/lib.rs
  • rust_hft/market-core/engine/src/dataflow/ingestion.rs
  • rust_hft/market-core/engine/src/execution_worker.rs
  • rust_hft/market-core/engine/src/lib.rs
  • rust_hft/market-core/runtime/src/system_builder.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6160b150a9

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rust_hft/market-core/engine/src/dataflow/ingestion.rs Outdated
Comment thread rust_hft/market-core/engine/src/lib.rs
Base automatically changed from codex/cex-latency-guideline to main July 29, 2026 11:13
@proerror77
proerror77 merged commit 41f78fe into main Jul 29, 2026
38 checks passed
@proerror77
proerror77 deleted the codex/latency-real-samples-397 branch July 29, 2026 12:25
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.

Latency telemetry: export real samples instead of duplicated rolling means

1 participant