From 707d2154b1c93b4b4e78987dd3129dea186356ff Mon Sep 17 00:00:00 2001 From: David Smiley Date: Thu, 3 Sep 2026 09:49:01 -0400 Subject: [PATCH 1/2] Tracing & audit: HttpSolrCall.getQueryParams Improve the fidelity of tracing & audit info by using the body payload parameters if POST url-encoded. --- .../core/src/java/org/apache/solr/servlet/HttpSolrCall.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java index 3d80367921f..cec6cf3346b 100644 --- a/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java +++ b/solr/core/src/java/org/apache/solr/servlet/HttpSolrCall.java @@ -201,8 +201,12 @@ public SolrCore getCore() { return core; } + /** + * If the request has been created, return its parameters (merges URL and body if applicable); + * otherwise, return only the URL query parameters. + */ public SolrParams getQueryParams() { - return queryParams; + return solrReq != null ? solrReq.getParams() : queryParams; } /** The collection(s) referenced in this request. Populated in {@link #init()}. Not null. */ From 81cd9bcd91444d6fd80e53b55179502af447d925 Mon Sep 17 00:00:00 2001 From: David Smiley Date: Thu, 3 Sep 2026 10:02:04 -0400 Subject: [PATCH 2/2] changelog --- .../unreleased/PR#4870-httpSolrCallGetQueryParams.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 changelog/unreleased/PR#4870-httpSolrCallGetQueryParams.yml diff --git a/changelog/unreleased/PR#4870-httpSolrCallGetQueryParams.yml b/changelog/unreleased/PR#4870-httpSolrCallGetQueryParams.yml new file mode 100644 index 00000000000..d4f29e24bf0 --- /dev/null +++ b/changelog/unreleased/PR#4870-httpSolrCallGetQueryParams.yml @@ -0,0 +1,10 @@ +title: > + Distributed tracing and audit logging now see request parameters sent in a url-encoded POST body, + not only those in the URL query string. +type: changed +authors: + - name: David Smiley + - name: Xinyao Zhang +links: + - name: PR#4870 + url: https://github.com/apache/solr/pull/4870