Skip to content
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

Support httpx/httpcore #248

Closed
smcoll opened this issue Nov 19, 2020 · 4 comments
Closed

Support httpx/httpcore #248

smcoll opened this issue Nov 19, 2020 · 4 comments

Comments

@smcoll
Copy link

smcoll commented Nov 19, 2020

i'd be interested in seeing support for httpx alongside aiohttp, httplib, and requests. The default transport layer for httpx is httpcore which supports HTTP/2 in addition to HTTP/1.1.

These libraries have async support for asyncio, trio, and curio.

@srprash
Copy link
Contributor

srprash commented Nov 30, 2020

Hi @smcoll Thanks for opening this feature request. I'll put this in our backlog and would work on it as soon as possible. We would highly appreciate if you want to contribute towards the httpx support in the SDK. :)

I would also recommend you to try and open this request on the OpenTelemetry for Python since it already has a wide array of growing instrumentation support and also active contribution from the open source community. We are also actively working to provide X-Ray support for customers using OpenTelemetry Python.

@smcoll
Copy link
Author

smcoll commented Dec 18, 2020

Cool - i added issue open-telemetry/opentelemetry-python-contrib#263

@thehesiod
Copy link
Contributor

thehesiod commented Oct 7, 2021

at first I thought aiohttp was needed, but it's actually available via https://github.com/aws/aws-xray-sdk-python#working-with-aiohttp if you see the client portion. Note however that opentracing support in aiohttp is not complete per aio-libs/aiohttp#3084

@thehesiod
Copy link
Contributor

btw for others that want to enable it globally I'm doing something like this (note untested):

def _wrap_clientsession_init(func, instance, args, kwargs):
    trace_config = aws_xray_trace_config()
    kwargs['trace_configs'] = [trace_config]
    return func(*args, **kwargs)

wrapt.wrap_function_wrapper(aiohttp, "ClientSession.__init__", _wrap_clientsession_init)

michael-k added a commit to michael-k/aws-xray-sdk-python that referenced this issue Sep 27, 2022
michael-k added a commit to michael-k/aws-xray-sdk-python that referenced this issue Sep 27, 2022
michael-k added a commit to michael-k/aws-xray-sdk-python that referenced this issue Sep 27, 2022
michael-k added a commit to michael-k/aws-xray-sdk-python that referenced this issue Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants