request help: logger plugins supports limit size of request/response body
Discussed in https://github.com/apache/apisix/discussions/5892
Originally posted by lrfdehao December 23, 2021
Suppose I have two fields, include_resp_body as the switch, resp_limit_size as the limit size. After configuring these two parameters, if resp_body exceeds the size of resp_limit_size, resp_body will not be recorded in the log. The same is true for req_body
we can truncate oversized request and response bodies based on limit size
LGTM
LGTM
Hi @juzhiyuan The pr is not merged. do we have any plan to support this feature? This is a good idea in production environment to do api statistics. And for now (apisix version 3.1.0), do we have any workaround for this? I don't think all http response has a content-length header.
cc @leslie-tsang
@pixeldin How about this PR to support truncat the body if it's too large in loggers?
@Baoyuantop i think this issue has been resolved recently, look #13034 #11133