fix(commons): return the child-only tracer provider shutdown error #2385
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 275 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.336
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2385"
general
weight: 0.35
tanishagoyal2
Summary
tracing.ShutdownTracingdiscarded the error from the child-only tracer provider with_ =. That provider carries the database driver spans (otelmongo, otelsql). When its final flush failed, those spans were lost and nothing was logged, because every service logs only the error thatShutdownTracingreturns (fault-quarantine, node-drainer, platform-connectors, janitor, janitor-provider, event-exporter, health-events-analyzer, lifecycle-manager).This change shuts down both providers even when one fails, and returns both errors with
errors.Join. The function signature does not change, and the callers already log the returned error, so no caller needs an edit.A table-driven test covers: not initialized, both providers succeed, child-only fails, primary fails, both fail. The child-only and both-fail cases fail on the current
mainand pass with this change.Type of Change
Component(s) Affected
Testing
make -C commons lint-test,make license-headers-lint)Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Tracing shutdown now attempts to stop all configured providers, even if one reports a failure. Errors from each provider are retained with identifying context and reported together, making failures from either or both providers visible.
* Clean shutdown behavior remains unchanged when no errors occur, and shutdown results now reflect failures more completely when providers fail independently or at the same time.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->