-
Notifications
You must be signed in to change notification settings - Fork 625
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
[Requests] Replace span name callback with request and response hooks #411
Comments
I can take on this issue. cc @alolita |
@NickSulistio |
Yeah! Sorry for the delays, I can get it done this week. |
If you are working on all of the instrumentations that is great! We just have individual tasks for the hooks so be sure to link your PR to each when you submit it. |
@ryokather |
Hi @lzchen. I believe in my previous PR I investigated into this and found out that implementing hooks on the requests instrumentation isn't easily achievable because the wrapper for Session.request provides no ability to access a request-like object which is necessary for a request_hook. I left it in case anyone else has a better idea! |
Hi, I have been investigating this issue and apparently we could remove the instrumentation of Session.request and leave only Session.send (request goes through send anyway). When you remove the instrumentation for request only one test fails: Thus, by the time we reach send we always have a PreparedRequest object we can use for the request_hook callback argument. |
Requests instrumentation accepts a span name callback which should be replaced with more generic request/response callbacks (hooks).
Details: #408
The text was updated successfully, but these errors were encountered: