-
Notifications
You must be signed in to change notification settings - Fork 433
Description
What are you trying to achieve?
I would like to have an ability to (conditionally) see contents of all messages that are sent or received via GRPCClient v2 for debug purposes. In our app we have a command line argument to enable debugging interaction with backend. Sources of ClientInterceptor
has an example of LoggingInterceptor
, but it only logs metadata, but not the messages.
What have you tried so far?
I tried investigation whether ClientContext
, StreamingClientRequest
and StreamingClientResponse
has the data I need. It seems like there is no way to get sent message from the StreamingClientRequest.producer
. It might be possible to get the message StreamingClientResponse.bodyParts
, but I can find an example how to do it properly (and if it's safe to do at all in interceptor). Any advice on how to approach this?