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

aiohttp 2.x+ client tracing support #294

Closed

Conversation

thehesiod
Copy link
Contributor

@thehesiod thehesiod commented Jun 22, 2017

  • builds on aiohttp enhancements #259 and supports full circle tracing from client to server and back
  • bumps minimum supported aiohttp 2.x version to 2.1, but adds 2.3 to fix unittest
  • adds missing aenter/aexit to aiohttp ClientResponse class

@thehesiod
Copy link
Contributor Author

thehesiod commented Apr 8, 2019

not sure why celery is failing, doesn't look like there are any fixes from master

# Conflicts:
#	tests/contrib/aiohttp/app/web.py
#	tests/contrib/aiohttp/test_request.py
@jd
Copy link
Contributor

jd commented Apr 30, 2019

@irabinovitch at least, this needs some love, the tests still use nose, which we removed.

Copy link
Contributor

@jd jd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no expert of ddtrace API yet, but as far as I can tell, this looks pretty good.

exc_tb)
finally:
if self._self_have_context and self._self_trace_context:
self._self_span.finish()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe define a _finish_span method that can be used here and in L195 to avoid repeating?

@thehesiod
Copy link
Contributor Author

will get back to this PR asap, thanks for feedback

@asvetlov
Copy link

asvetlov commented May 1, 2019

Does anybody use aiohttp 2.x now?

@thehesiod thehesiod changed the title aiohttp 2.x client tracing support aiohttp 2.x+ client tracing support May 1, 2019
@thehesiod
Copy link
Contributor Author

it works in 3.x as well, just it's not using the new aiohttp trace endpoints since it's missing some items: aio-libs/aiohttp#3084

@asvetlov
Copy link

asvetlov commented May 1, 2019

Thanks for remembering the missing functionality :)

@mklokocka
Copy link

Any news on this? @thehesiod

…client

# Conflicts:
#	ddtrace/context.py
#	ddtrace/contrib/aiohttp/middlewares.py
#	ddtrace/contrib/aiohttp/patch.py
#	tests/contrib/aiohttp/app/web.py
@thehesiod
Copy link
Contributor Author

Any news on this? @thehesiod

unfortunately no, however we're trying to get some more traction on my PRs via a different channel

@Kyle-Verhoog
Copy link
Member

Thanks so much to @thehesiod for this work! We're going to continue it in #1319 so that we can work collaboratively to get it across the finish line 😄

@thehesiod thehesiod deleted the thehesiod-aiohttp-client branch April 16, 2020 22:45
Kyle-Verhoog added a commit that referenced this pull request Mar 9, 2022
This PR adds support for aiohttp client.

Work was long ago started on this in (#294 (thank you @thehesiod!!!). There were a number of issues in the library that led to not being able to merge in the work such as async context management, service naming, integration configuration and more which have all since been addressed.

#294 and later #1372 included additional support for ClientResponse and StreamReader which are omitted here with the intention of introducing them as follow ups.

Co-authored-by: Alexander Mohr <[email protected]>
Kyle-Verhoog added a commit that referenced this pull request Mar 9, 2022
This PR adds support for aiohttp client.

Work was long ago started on this in (#294 (thank you @thehesiod!!!). There were a number of issues in the library that led to not being able to merge in the work such as async context management, service naming, integration configuration and more which have all since been addressed.

#294 and later #1372 included additional support for ClientResponse and StreamReader which are omitted here with the intention of introducing them as follow ups.

Co-authored-by: Alexander Mohr <[email protected]>
brettlangdon pushed a commit that referenced this pull request Mar 9, 2022
This PR adds support for aiohttp client.

Work was long ago started on this in (#294 (thank you @thehesiod!!!). There were a number of issues in the library that led to not being able to merge in the work such as async context management, service naming, integration configuration and more which have all since been addressed.

Co-authored-by: Alexander Mohr <[email protected]>
(cherry picked from commit 2ac1fc9)
brettlangdon pushed a commit that referenced this pull request Mar 9, 2022
This PR adds support for aiohttp client.

Work was long ago started on this in (#294 (thank you @thehesiod!!!). There were a number of issues in the library that led to not being able to merge in the work such as async context management, service naming, integration configuration and more which have all since been addressed.

#294 and later #1372 included additional support for ClientResponse and StreamReader which are omitted here with the intention of introducing them as follow ups.

Co-authored-by: Alexander Mohr <[email protected]>

Co-authored-by: Kyle Verhoog <[email protected]>
Co-authored-by: Alexander Mohr <[email protected]>
brettlangdon added a commit that referenced this pull request Mar 9, 2022
* feat(aiohttp): add client integration (#3362)

This PR adds support for aiohttp client.

Work was long ago started on this in (#294 (thank you @thehesiod!!!). There were a number of issues in the library that led to not being able to merge in the work such as async context management, service naming, integration configuration and more which have all since been addressed.

Co-authored-by: Alexander Mohr <[email protected]>
(cherry picked from commit 2ac1fc9)

* Update ddtrace/contrib/aiohttp/__init__.py

Co-authored-by: Kyle Verhoog <[email protected]>
Co-authored-by: Brett Langdon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants