ref(boto3): Split integration into internal modules - #7537
Conversation
Codecov Results 📊✅ 132233 passed | ⏭️ 7214 skipped | Total: 139447 | Pass Rate: 94.83% | Execution Time: 440m 53s 📊 Comparison with Base Branch
➖ Removed Tests (60)View removed tests
All tests are passing successfully. ✅ Patch coverage is 90.24%. Project has 2551 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## master #PR +/-##
==========================================
- Coverage 90.30% 90.29% -0.01%
==========================================
Files 195 198 +3
Lines 26261 26279 +18
Branches 9798 9798 —
==========================================
+ Hits 23714 23728 +14
- Misses 2547 2551 +4
- Partials 1485 1485 —Generated by Codecov Action |
ericapisani
left a comment
There was a problem hiding this comment.
Thanks for making the earlier changes. There's one more change that we can try and make to avoid the need for dynamic imports altogether, have left a comment within one of the methods explaining.
Otherwise, this LGTM, approving in order to not block once that's been addressed
| def _sentry_before_sign( | ||
| request: "AWSRequest", signature_version: "Any", **kwargs: "Any" | ||
| ) -> None: | ||
| from sentry_sdk.integrations.boto3 import Boto3Integration |
There was a problem hiding this comment.
A fun thing that you can do to try and get around the need for this dynamic import - you can provide the string rather than the class to client.get_integration.
So I think lines 117 and 118 below would look like this:
if client.get_integration("Boto3Integration") is None:
return
There was a problem hiding this comment.
Okay good to know, I didn't knew this was possible. Then we'll probably use client.get_integration("boto3") instead, right? Since we use boto3 as identifier for the integration.
There was a problem hiding this comment.
I'll do this probably in a later PR, cause I don't want to do merge hell once again 😭
There was a problem hiding this comment.
Sounds good, totally understandable 👍🏻
5bbe368 to
591151d
Compare
591151d to
81fd35f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 81fd35f. Configure here.
8bf4d1c to
a45c039
Compare
c9e19dc to
d4858fe
Compare
d4858fe to
b21b888
Compare

Description
Move
Boto3Integrationfrom single module into package with smaller internal modules._client.py._instrumentation.py.from sentry_sdk.integrations.boto3 import Boto3Integration.