-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fix fetching Go server status code #1044
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1044 +/- ##
==========================================
+ Coverage 73.32% 81.59% +8.26%
==========================================
Files 137 138 +1
Lines 11014 11028 +14
==========================================
+ Hits 8076 8998 +922
+ Misses 2306 1514 -792
+ Partials 632 516 -116
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Current implementation is even more elegant and concise than previous one. Congrats and thanks!
Thanks @mariomac ! |
Our status code fetching for Go HTTP/HTTP2 was relying on a single interface implementation for the response writer. This works in most cases, but it doesn't work with custom response writers, which can be implemented by users and as I recently discovered, the GRPC server has another mode, which lets users implement a single handler for HTTP and gRPC.
This PR does few things:
I confirmed in the headers the value is indeed -1.