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:29:47 UTC
[solr] branch main 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 main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 35fc4bdc481 SOLR-16808: Don't publish envVars via the Metrics API
35fc4bdc481 is described below
commit 35fc4bdc48171d9a64251c54a1e76deb558cf9d8
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
---
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 a33bfd8523a..245c1329351 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -187,6 +187,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);
}