refactor(dpa-manager): pair monitor latency with failure logs#3799
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
Summary by CodeRabbit
WalkthroughThe DPA monitor now reports iteration completion through a ChangesDPA iteration observability
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-3799.docs.buildwithfern.com/infra-controller |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/dpa-manager/src/metrics.rs`:
- Around line 248-277: Add a fractional-latency case to the iteration metrics
tests around the existing “successful iteration stays silent” and “failed
iteration retains the warning” cases, using Duration::from_micros(...) and
asserting the histogram_sum_delta preserves the fractional millisecond value.
Keep the expected logging behavior and histogram count consistent with the
corresponding iteration outcome.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 73fa455a-bee5-4131-ab31-b3e58a6376f4
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
crates/dpa-manager/Cargo.tomlcrates/dpa-manager/src/lib.rscrates/dpa-manager/src/metrics.rsdocs/observability/core_metrics.md
The DPA monitor recorded iteration latency separately from the WARN that explained a failed pass. Close each pass with one histogram-backed Event inside its iteration span. Successful passes remain metric-only, failed passes retain the historical warning and error context, and lock-contention diagnostics, cadence changes, gauges, and batched counters keep their existing behavior. The exposed metric family, HELP text, fractional-millisecond precision, and label-free series remain unchanged. Table-driven tests cover successful and failed emissions plus the Prometheus contract. This supports NVIDIA#3791 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
Exit code: 0
Wall time: 0.5 seconds
Output:
The DPA monitor recorded iteration latency separately from the WARN that explained a failed pass.
This closes each pass with one histogram-backed Event inside its iteration span. Successful passes remain metric-only; failed passes retain the historical warning and error context with the pass's
span_id. Work-lock diagnostics, cadence changes, gauges, and batched counters keep their existing behavior.carbide_dpa_monitor_iteration_latency_milliseconds, its HELP text, fractional-millisecond precision, and label-free series do not change. Table-driven tests cover successful and failed emissions plus the Prometheus contract.Related issues
Type of Change
Breaking Changes
Testing
Verified with:
cargo test -p carbide-dpa-manager metrics::testscargo make format-nightlycargo make clippycargo make carbide-lintscargo xtask check-event-namescargo xtask check-metric-docscargo xtask check-workspace-depscargo make --no-workspace check-licensescargo make --no-workspace check-bansAdditional Notes
docs/observability/core_metrics.mdis generated from the Event declaration and intentionally stays with the code change.Closes #3791