-
Notifications
You must be signed in to change notification settings - Fork 841
Add an AIOHTTP exporter #1139
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
Add an AIOHTTP exporter #1139
Conversation
|
oops, I just noticed ruff reformatted a file it shouldn't have |
Since the client now requires a minimum of Python 3.9, we don't need to have this feature gate in place any more Signed-off-by: Lexi Robinson <lexi@lexi.org.uk>
c2e78d5 to
f1a4c87
Compare
csmarchbanks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I am happy enough to have lightweight helpers like this, my one ask would be to put it into its own module similar to twisted rather than in the base module and __init__.py. That makes it a bit more clear that the code is separate and to be sure not to depend on it in core.
tox.ini
Outdated
|
|
||
| [testenv] | ||
| deps = | ||
| aiohttp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to twisted it would be good to only install this onto certain versions so that we don't break something core in environments where aiohttp is not present.
Unfortunately the AIOHTTP library doesn't support ASGI and apparently has no plans to do so which makes the ASGI exporter not suitable for anyone using it to run their python server. Where possible this commit follows the existing ASGI implementation and runs the same tests for consistency. Signed-off-by: Lexi Robinson <lexi@lexi.org.uk>
f1a4c87 to
cac3175
Compare
|
Sure thing, how's this? |
csmarchbanks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
I wrote a significantly cruder version of this for a project and then realised that other people might find it useful so I spent a few hours writing a nicer one with tests and docs and so on.
I'm sure you don't want to have custom exporters for every http library under the sun but I figured since it's a pretty widely used library it'd be ok. Feel free to close if I was wrong.
cc @csmarchbanks