← Back to Pull requests

chore(crashtracking): turn on otel thread ctx collection for crashtracking #21730

Closed
unknown closed this pull request without merging on Nov 13, 2026 22:03 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 18:26 UTC
Author

Description


If tracing OTel thread context sharing is on, then we turn on thread context collection at crash time in the crashtracker. There is future work to capture process context so attribute keys can be identified and to close out active spans at crash time -- this is the first step

Testing

Unit test to assert that OTel thread context data is captured in crash report

[
  {
    "tid": 37,
    "thread_name": "python",
    "trace_id": "6af6087100000000909af2153bf7fa69",
    "span_id": "d1a9309e8223ac19",
    "trace_flags": 0,
    "attributes": [
      {
        "key_index": 0,
        "value": "d1a9309e8223ac19"
      }
    ]
  },
  {
    "tid": 42,
    "thread_name": "python",
    "trace_id": "6af6087100000000e78f19edd1ff9497",
    "span_id": "9656f4f1999324e6",
    "trace_flags": 0,
    "attributes": [
      {
        "key_index": 0,
        "value": "9656f4f1999324e6"
      }
    ]
  },
  {
    "tid": 43,
    "thread_name": "python",
    "trace_id": "6af60871000000009a986a8f6fecac55",
    "span_id": "06439b8244b0523f",
    "trace_flags": 0,
    "attributes": [
      {
        "key_index": 0,
        "value": "06439b8244b0523f"
      }
    ]
  },
  {
    "tid": 44,
    "thread_name": "python",
    "trace_id": "6af6087100000000170d830793ba76d6",
    "span_id": "7497ea3e54593918",
    "trace_flags": 0,
    "attributes": [
      {
        "key_index": 0,
        "value": "7497ea3e54593918"
      }
    ]
  }
]

Risks

<!-- Note any risks associated with this change, or "None" if no risks -->

Additional Notes

<!-- Any other information that would be helpful for reviewers -->

Diff: 212 lines (+159 / -53) across 2 files Reviewer: gyuheon0h Review duration: 1656m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 212 lines diff across 2 files
0.37
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.321
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #21730"
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: 36.5% (MEDIUM) · Higher = larger blast radius
36.5%
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: 14.4% · Safe to merge
14.4%