Set RequestLog#content
for AnnotatedService
if a pojo is requested/returned
#5711
Labels
Milestone
RequestLog#content
for AnnotatedService
if a pojo is requested/returned
#5711
Logging[Client|Service]
can be confusing since the request/response content is sometimes logged, and sometimes not logged.Request/Responses are logged when:
GrpcService
orThriftService
is usedContentPreviewing[Client|Service]
is usedThe majority of our users use
AnnotatedService
along withGrpcService
orThriftService
.However, when adding a
Logging[Client|Service]
to APIs, it may be surprising that some services log content by default while others don't.In most cases, this isn't a big problem. However, we recently saw a case where a service handling sensitive data used
AnnotatedService
and intentionally didn't add aContentPreviewing[Client|Service]
. While adoptingGrpcService
, they found that sensitive information was being logged by default.I believe if we just log content for
AnnotatedService
by default as well, users can be aware that content will be left in most cases and configureLogging[Client|Service]
accordingly. As an added bonus, by leaving the POJO atRequestLog#content
we may potentially also allow users to sanitize specific fields more easily.The text was updated successfully, but these errors were encountered: