Skip to content

feat(boto3): Add propagate_traces option - #8244

Merged
sentrivana merged 2 commits into
major/3.0from
ivana/boto3-propagate-traces-option
Nov 11, 2026
Merged

sentrivana merged 2 commits into
major/3.0from
ivana/boto3-propagate-traces-option

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds Boto3Integration(propagate_traces=True). Setting it to False stops the integration from changing the request params of AWS calls:

  • Lambda Invoke no longer gets trace data in ClientContext.
  • Once feat(boto3): Add SQS/SNS trace propagation #8145 lands: SQS SendMessage / SendMessageBatch and SNS Publish / PublishBatch no longer get sentry-trace / baggage message attributes, and SQS ReceiveMessage no longer appends our names to MessageAttributeNames.

The option gates the shared get_request_params hook, so it covers every extension that uses it without per-service changes. Spans are still created as before.

This is an escape hatch for setups where the added data breaks calls, e.g. a queue or topic whose MaximumMessageSize is set below the 256 KiB the #8145 size check assumes, or consumers that reject unknown attributes. The name matches CeleryIntegration(propagate_traces=...).

HTTP sentry-trace / baggage headers on AWS requests are not affected. They're also added by the stdlib integration and are already controlled by trace_propagation_targets.

Independent of #8145. The SQS/SNS test cases pass trivially until #8145 is merged, and guard the option after that. Whichever PR merges second needs a small conflict fix at the end of test_trace_propagation.py, since both append tests there.

via @sentrivana.

--

View Session [Sentry]

@sentry-junior
sentry-junior Bot requested a review from a team as a code owner November 11, 2026 13:30
@sentry-junior
sentry-junior Bot added this pull request to stack #8245 November 11, 2026 13:30
@sentry-junior
sentry-junior Bot removed this pull request from stack #8245 November 11, 2026 13:32
@sentry-junior
sentry-junior Bot added this pull request to stack #8246 November 11, 2026 13:32
@sentry-junior
sentry-junior Bot removed this pull request from stack #8246 November 11, 2026 13:35
@sentry-junior
sentry-junior Bot force-pushed the ivana/boto3-propagate-traces-option branch from 151717d to 8d6000c Compare November 11, 2026 13:35
@sentry-junior
sentry-junior Bot changed the base branch from pablo/boto3-add-sqs/sns-propagation to major/3.0 November 11, 2026 13:35
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 58526 passed | ⏭️ 3067 skipped | Total: 61593 | Pass Rate: 95.02% | Execution Time: 160m 7s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -85282
Passed Tests 📉 -80584
Failed Tests —
Skipped Tests 📉 -4698

All tests are passing successfully.

✅ Patch coverage is 100.00% (6 of 6 changed executable lines covered; target 80%).
Project statement coverage is 90.40% (up 0.16 percentage points from base (36870b8) to head (00dbfcc)).

Changed files with executable lines (2)
File Patch coverage Changed executable lines
sentry_sdk/integrations/boto3/init.py 100.00% 2/2 covered
sentry_sdk/integrations/boto3/_client.py 100.00% 4/4 covered
Coverage diff
@@            Coverage Diff             @@
##        master     #8244       +/-##
==========================================
+ Coverage    90.24%    90.40%    +0.16%
==========================================
  Files          203       199        -4
  Tracked lines     27125     21715     -5410
  Branches     10142      7546     -2596
==========================================
- Hits         24478     19630     -4848
+ Misses        2647      2085      -562
+ Partials      1541      1254      -287

Generated by Coverage Action

@sentrivana
sentrivana merged commit 49473c4 into major/3.0 Nov 11, 2026
152 checks passed
@sentrivana
sentrivana deleted the ivana/boto3-propagate-traces-option branch November 11, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant