← Back to Pull requests

fix(commons): return the child-only tracer provider shutdown error #2385

Closed
unknown closed this pull request without merging on Nov 15, 2026 22:30 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 22:22 UTC
Author

Summary

tracing.ShutdownTracing discarded 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 that ShutdownTracing returns (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 main and pass with this change.

Type of Change


  • 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Testing


  • Tests pass locally (make -C commons lint-test, make license-headers-lint)

  • Manual testing completed

  • No breaking changes (or documented)
  • Checklist


  • Self-review completed

  • Documentation updated (if needed)

  • Ready for review
  • <!-- 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 -->

    Diff: 275 lines (+206 / -69) across 3 files Reviewer: tanishagoyal2 Review duration: 4328m
    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
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.6% (MEDIUM) · Higher = larger blast radius
    39.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.6% · Safe to merge
    15.6%