-
Notifications
You must be signed in to change notification settings - Fork 576
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 convenience wrappers for http.Get/Post, etc. #390
Conversation
Add convenience wrappers for http.{Get,Post,Head,PostForm} using the otelhttp transport and taking a context.Context directly. Makes instrumenting code using the original http convenience methods a one-line change instead of a multiline one.
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.
I like the idea! Can you please add some tests and a CHANGELOG.md
entry?
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Added to CHANGELOG. Tests might need to wait a bit. |
Co-authored-by: Sam Xie <xsambundy@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
@johnbley one last thing, it looks like the |
Add convenience wrappers for http.{Get,Post,Head,PostForm}
using the otelhttp transport and taking a context.Context directly.
Makes instrumenting code using the original http convenience methods a
one-line change instead of a multiline one.