8000 ref: Make HTTP transport extensible by untitaker · Pull Request #235 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content

ref: Make HTTP transport extensible #235

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

Merged
merged 1 commit into from
Jan 11, 2019

Conversation

untitaker
Copy link
Member

Use like this:

from sentry_sdk.transport import HTTPTransport

class CustomHTTPTransport(HTTPTransport):
    def _get_pool_options(self, *args, **kwargs):
        options = HTTPTransport._get_pool_options(self, *args, **kwargs)
        options['cert_file'] = '...'

sentry_sdk.init(..., transport=CustomHTTPTransport)

This allows you to overwrite the entire urllib3 connection pool if you feel like it.

@codecov-io
Copy link
codecov-io commented Jan 11, 2019

Codecov Report

Merging #235 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
+ Coverage   81.26%   81.27%   +0.01%     
==========================================
  Files          32       32              
  Lines        2674     2676       +2     
  Branches      430      430              
==========================================
+ Hits         2173     2175       +2     
  Misses        338      338              
  Partials      163      163
Impacted Files Coverage Δ
sentry_sdk/transport.py 80.9% <100%> (+0.35%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93bab13...e7ff072. Read the comment docs.

@untitaker untitaker merged commit f0c8edb into master Jan 11, 2019
@untitaker untitaker deleted the ref/transport-http-subclassable branch January 11, 2019 15:33
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.

2 participants
0