Skip to content

feat: add max request and response body size attributes to http-logger plugin #12130

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

Open
MariaLapovska opened this issue Apr 10, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@MariaLapovska
Copy link

Description

In some cases APISIX users might want to customize the max size of request/response body sent to HTTP server via http-logger plugin to be lower/higher than the current default value of 512KiB.

kafka-logger plugin already supports max_resp_body_bytes and max_req_body_bytes attributes, so I followed the example and added them in this PR.

@MariaLapovska
Copy link
Author

Hi @Baoyuantop ! I've created the issue for this PR per your request

@Baoyuantop
Copy link
Contributor

From the current code, these properties are defined in public functions with #11133

It looks like other log-like plugins can configure these settings directly, but for APISIX, do we need to standardize the documentation of other log plugins and add relevant tests?

@MariaLapovska
Copy link
Author

@Baoyuantop don't max_req_body_bytes and max_resp_body_bytes need to be defined in the logging plugins schemas to actually be evaluated?

@Baoyuantop
Copy link
Contributor

Baoyuantop commented May 26, 2025

The schema of these plugins does not define additionalProperties = false, which means that you can add these properties directly in the plugin's configuration, but this behavior is untested and may have unexpected problems.

So I think it's still recommended to supplement the corresponding documentation and tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants