Skip to content

ref(transport): Add shared sync/async transport superclass and create a sync http subclass #4572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: potel-base
Choose a base branch
from

Conversation

srothh
Copy link
Member

@srothh srothh commented Jul 11, 2025

Moved shared sync/async logic into superclass, and moved sync transport specific code into a new subclass(BaseSyncHttpTransport), from which the current transport implementations inherit. Note that currently the threaded worker is still being created in the superclass. In a next step, I want to add an abstract worker class for both the threaded and async task worker, however I wanted to keep this PR atomic and only re-implement the sync transport with the new hierarchy.

Fixes GH-4568

…ted a sync transport HTTP subclass

Moved shared sync/async logic into a new superclass (HttpTransportCore), and moved sync transport specific code into a new subclass(BaseSyncHttpTransport), from which the current transport implementations inherit

Fixes GH-4568
Copy link

codecov bot commented Jul 11, 2025

Codecov Report

Attention: Patch coverage is 87.80488% with 5 lines in your changes missing coverage. Please review.

Project coverage is 84.94%. Comparing base (bd94010) to head (19f7211).
Report is 7 commits behind head on potel-base.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/transport.py 87.80% 5 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##           potel-base    #4572      +/-   ##
==============================================
+ Coverage       84.89%   84.94%   +0.04%     
==============================================
  Files             144      158      +14     
  Lines           15012    15373     +361     
  Branches         2376     2423      +47     
==============================================
+ Hits            12745    13059     +314     
- Misses           1539     1568      +29     
- Partials          728      746      +18     
Files with missing lines Coverage Δ
sentry_sdk/transport.py 84.13% <87.80%> (+1.08%) ⬆️

... and 20 files with indirect coverage changes

srothh added 2 commits July 11, 2025 11:30
Removed an unnecessary TODO message and reverted a class name change for BaseHTTPTransport.

GH-4568
Adds test coverage for the error handling path when HTTP requests return
error status codes.

GH-4568
@srothh srothh changed the title ref(transport): Added shared sync/async transport superclass and created a sync http subclass ref(transport): Add shared sync/async transport superclass and create a sync http subclass Jul 11, 2025
@srothh srothh marked this pull request as ready for review July 11, 2025 12:16
@srothh srothh requested a review from a team as a code owner July 11, 2025 12:16
@srothh srothh marked this pull request as draft July 11, 2025 12:17
@srothh srothh marked this pull request as ready for review July 11, 2025 12:17
Restore comments accidentally removed during a previous commit.
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