-
Notifications
You must be signed in to change notification settings - Fork 260
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
Incorrect logging protobuf requests/responces #1330
Comments
Can fix it ASAP. |
@juncevich out of interest, which web server are you running? |
@skjolber Netty with Micronaut. |
I wonder if gRPC logging might be better served with a gRPC-centric module. At least thats how we're doing it internally (emulating the Logbook output format). Also the HTTP 2 does not follow a strict request-response any more, with 1-n, n-1 or n-n combinations, not sure whether logbook will work as-is now @whiskeysierra? |
I've offered not to convert body to string in method |
Yep
|
Mmh, I see a bigger problem now. logbook/logbook-api/src/main/java/org/zalando/logbook/BodyFilter.java Lines 11 to 13 in 39cc999
As you can see, the interface that we defined here takes a |
@whiskeysierra Will we fix these problems? I can do it) |
I'd love to, but it sounds like a breaking change, tbh. |
@juncevich Just curious, do you just use protobuf over HTTP? I'm thinking how to integrate Logbook with gRPC and I'm looking for ways to do that cleanly. |
FYI we are using |
Can you share some of that code by any chance?
…On Mon, 8 May 2023, 17:03 Thomas Skjølberg, ***@***.***> wrote:
FYI we are using grpc-java and grpc-netty with subclasses of
io.grpc.ServerInterceptor.
—
Reply to this email directly, view it on GitHub
<#1330 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADI7HJK5RQPSH6EXSGCRW3XFEDKLANCNFSM5YCZAW5A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes. I've extracted the relevant subset of our internal logging project and published it here, it still needs some cleanups, but it is a fully working example (at least the unit tests run). You'll notice that Logbook is not in use at all, however the output (JSON) format is essentially the same as in Logbook. Also the gRPC stack typically lets us return a ton of responses for a single request, this turned out to be too noisy for our taste, so we added some "summary" request-response message types. |
Yes. |
In order to prioritize the support for Logbook, we would like to check whether the old issues are still relevant.
|
Useless converting raw bytes from request(response) bodies broke protobuf model deserialization.
Description
Protobuf response body incorrect deserializing, because FilteredHttpRequest(FilteredHttpResponse).getBody() converts body to string and after that convert string to byte array. Which cause to brake model from body. For example, if i have raw body bytes array size 170, response.getBody() array of bytes size will 250, because it was converted to string.
Expected Behavior
FilteredHttpRequest.getBody() gives raw bytes, without converting to string.
Actual Behavior
Possible Fix
getBody must contains raw bytes from response
The text was updated successfully, but these errors were encountered: