-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove usage of grpc-gateway in otlpreceiver. #3422
Conversation
} else { | ||
msg, err = proto.Marshal(s.Proto()) | ||
msg, err = proto.Marshal(rsp) |
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.
Shouldn't we log these errors?
w.WriteHeader(statusCode) | ||
w.Write(msg) // nolint:errcheck | ||
// Nothing we can do with the error if we cannot write to the response. | ||
_, _ = w.Write(msg) |
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.
Ditto.
} | ||
|
||
// Pre-computed status with code=Internal to be used in case of a marshaling error. | ||
var fallbackMsg = []byte(`{"code": 13, "message": "failed to marshal error message"}`) |
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.
Give a more self representative name such as marshalingErrorMsg = = []byte({"code": 13, "message": "failed to marshal error message"}
)
2857006
to
cd1f10b
Compare
…erent than grpc Signed-off-by: Bogdan Drutu <[email protected]>
cd1f10b
to
f90ddc7
Compare
Http protocols are different than grpc
Signed-off-by: Bogdan Drutu [email protected]