feat(aiobotocore): data streams monitoring for SQS, SNS and Kinesis #21994
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 177 lines diff across 2 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.310
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #21994"
general
weight: 0.35
wconti27
Description
aiobotocore (and aioboto3) calls to SQS, SNS and Kinesis produced spans but no Data Streams Monitoring checkpoints, and wrote no pathway context into messages. Pathways broke at every aiobotocore hop.
With DSM enabled, the aiobotocore wrapper now dispatches the same core events botocore does around SendMessage(Batch), ReceiveMessage, Publish(Batch), PutRecord(s) and GetRecords. It reuses botocore's injectors and DSM handlers unchanged; Kinesis GetRecords dispatch moves into
dispatch_received_records, shared by both. GetRecords calls that name no stream are skipped.The DSM processor now keeps the current pathway in a
ContextVarinstead of a thread-local. Concurrent asyncio tasks on one thread no longer share a pathway (this also affects aiokafka); threads behave as before.Testing
tests/contrib/aiobotocore/test_dsm.py(moto): SQS, SNS → SQS and Kinesis out → in linkage; concurrent tasks keep their own pathway (fails on the thread-local version); DSM off leaves messages unchanged.Risks
With DSM on, aiobotocore adds the
_datadogSQS/SNS attribute and rewrites JSON Kinesis data, as botocore does.🤖 Generated with Claude Code