You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2023/05/19 15:32:40 UTC
[solr] branch branch_9x updated: SOLR-16808: Don't publish envVars via the Metrics API
This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new cf7f39138d3 SOLR-16808: Don't publish envVars via the Metrics API
cf7f39138d3 is described below
commit cf7f39138d32ab1ff0fca9ec02cf6aebebf2aef6
Author: Houston Putman <ho...@apache.org>
AuthorDate: Fri May 19 10:58:41 2023 -0400
SOLR-16808: Don't publish envVars via the Metrics API
(cherry picked from commit 35fc4bdc48171d9a64251c54a1e76deb558cf9d8)
---
solr/CHANGES.txt | 2 ++
.../java/org/apache/solr/servlet/CoreContainerProvider.java | 12 ------------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 3304d3e2862..13e8ccdbeec 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -144,6 +144,8 @@ Bug Fixes
* SOLR-16801: Reset the thread's contextClassloader after loading the CoreContainer (Thomas Wöckinger, Houston Putman)
+* SOLR-16808: Stop publishing environment variables via the Metrics API (Houston Putman)
+
Dependency Upgrades
---------------------
* PR#1494: Upgrade forbiddenapis to 3.5 (Uwe Schindler)
diff --git a/solr/core/src/java/org/apache/solr/servlet/CoreContainerProvider.java b/solr/core/src/java/org/apache/solr/servlet/CoreContainerProvider.java
index fba2870063c..47eb8198e82 100644
--- a/solr/core/src/java/org/apache/solr/servlet/CoreContainerProvider.java
+++ b/solr/core/src/java/org/apache/solr/servlet/CoreContainerProvider.java
@@ -468,18 +468,6 @@ public class CoreContainerProvider implements ServletContextListener {
ResolutionStrategy.IGNORE,
"properties",
"system");
- MetricsMap sysenv =
- new MetricsMap(
- map ->
- System.getenv()
- .forEach(
- (k, v) -> {
- if (!hiddenSysProps.contains(k)) {
- map.putNoEx(String.valueOf(k), v);
- }
- }));
- metricManager.registerGauge(
- null, registryName, sysenv, metricTag, ResolutionStrategy.IGNORE, "env", "system");
} catch (Exception e) {
log.warn("Error registering JVM metrics", e);
}