fix(libsy): record decision call lifecycle telemetry - #908
nachiketb-nvidia wants to merge 1 commit into
Conversation
Signed-off-by: nachiketb <nachiketb@nvidia.com>
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA-NeMo/Switchyard/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. WalkthroughDecision calls now record a terminal outcome and duration. Successful replies add available response and token fields to the originating span. Tests cover replies, errors, explicit failures, dropped calls, and cancellation. The OpenTelemetry reference describes the spans, metrics, and timing behavior. ChangesDecision-call observability
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Decision-call telemetry covers the inspected reply, failure, and cancellation paths. No issue remains that should block merging after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 3 files. (1 skipped: 1 unsupported.)
A rabbit checks each call’s reply, Comment |
What
Record Decision Model call counts, duration, outcome, and available response metadata in the libsy driver, including failed and abandoned calls.
Why
CallDecisioncurrently emits no call metrics and leaves its span without an outcome or usage. Recording only in an HTTP host misses custom hosts and calls dropped during cancellation.Addresses Greg's request for
recordandDropon the decision step.How
started, a retained span, and reply ownership toCallDecision. Reply, failure, and unfulfilled drop each record exactly once.switchyard.decision_callsandswitchyard.decision_call_duration_ms, including host queueing, with algorithm, selected model, and outcome labels.libsy.decision_call. Keep request content, answers, and raw errors out of the span.Notes for reviewers
Independent of #907: based on main; either PR can merge first. Provider HTTP-attempt metrics and client error detail are outside this driver change.
Start with
CallDecision, then the observability helpers. Production Rust is +99/-16 (net +83).Validation
Summary by CodeRabbit