-
Notifications
You must be signed in to change notification settings - Fork 375
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
Update net/http instrumentation span annotation #907
Update net/http instrumentation span annotation #907
Conversation
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.
It's a good start, but I think we need to address exception tagging itself too. Couple of other minor suggestions for changes as well.
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.
Couple of other suggestions related to tests, but I think the rest of the changes look good.
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 good; thanks @ericmustin! 👍
Summary
This PR addresses Issue-888 . Currently, when a request raises an exception from a timeout(or otherwise), we don't annotate the span with any of the request or response details, since the
span_annotation!
method is called after the request is made and an exception would get raised.This PR splits the
annotate_span!
method into request and response specific annotation methods so that the span can be annotated with at least minimal tags in the case of an exception being raised by the request.Per the Contribution Guidelines I've also added a test for this use case.
Notes / Comments
Let me know what you think, happy to make any changes y'all feel would be appropriate here.