Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/content/exporters/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ params:

For safety, exporters limit the query string to 65,536 characters and accept at most 1,024
query parameters. The parameter limit counts every `&`-separated pair, including repeated
parameters and empty pairs.
parameters and empty pairs. These are fixed implementation limits and cannot be changed through
runtime configuration.

If a request exceeds either limit or contains invalid percent-encoding, the `/metrics` endpoint
returns HTTP `400 Bad Request` with the plain-text response `Invalid query parameters`.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ default String getParameter(String name) {
}
}

/** See {@code jakarta.servlet.ServletRequest.getParameterValues(String)} */
/**
* See {@code jakarta.servlet.ServletRequest.getParameterValues(String)}.
*
* <p>For safety, the default implementation applies two fixed limits: {@code maxQueryStringLength
* = 64 * 1024} (65,536 characters) and {@code maxQueryParameterCount = 1024} ({@code &}-separated
* parameter pairs). These implementation values are not exposed as runtime configuration.
* Requests that exceed either limit or contain invalid percent-encoding are rejected by the
* scrape handler with HTTP {@code 400 Bad Request}.
*/
@Override
@Nullable
// decode with Charset is only available in Java 10+, but we want to support Java 8
Expand Down