This is an automated email from the ASF dual-hosted git repository.

pvillard31 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 23c38947d43 NIFI-16297 Refresh JVM, connection analytics, and cluster 
metrics registries on every scrape to prevent stale instance ID series (#11625)
23c38947d43 is described below

commit 23c38947d435a6996efa76ff830dcf58698d46fc
Author: Alexander <[email protected]>
AuthorDate: Sat Sep 5 17:40:09 2026 +0200

    NIFI-16297 Refresh JVM, connection analytics, and cluster metrics 
registries on every scrape to prevent stale instance ID series (#11625)
---
 .../main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
index fd9d4a26d1a..786b008514a 100644
--- 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
+++ 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
@@ -558,11 +558,6 @@ public class StandardNiFiServiceFacade implements 
NiFiServiceFacade {
 
     private AuthorizableLookup authorizableLookup;
 
-    // Prometheus Metrics objects
-    private final JvmMetricsRegistry jvmMetricsRegistry = new 
JvmMetricsRegistry();
-    private final ConnectionAnalyticsMetricsRegistry 
connectionAnalyticsMetricsRegistry = new ConnectionAnalyticsMetricsRegistry();
-    private final ClusterMetricsRegistry clusterMetricsRegistry = new 
ClusterMetricsRegistry();
-
     private RuleViolationsManager ruleViolationsManager;
     private PredictionBasedParallelProcessingService parallelProcessingService;
     private NarManager narManager;
@@ -8077,6 +8072,9 @@ public class StandardNiFiServiceFacade implements 
NiFiServiceFacade {
         NiFiMetricsRegistry nifiMetricsRegistry = new NiFiMetricsRegistry();
         BulletinMetricsRegistry bulletinMetricsRegistry = new 
BulletinMetricsRegistry();
         VersionInfoRegistry versionInfoRegistry = new VersionInfoRegistry();
+        JvmMetricsRegistry jvmMetricsRegistry = new JvmMetricsRegistry();
+        ConnectionAnalyticsMetricsRegistry connectionAnalyticsMetricsRegistry 
= new ConnectionAnalyticsMetricsRegistry();
+        ClusterMetricsRegistry clusterMetricsRegistry = new 
ClusterMetricsRegistry();
 
         final NodeIdentifier node = controllerFacade.getNodeId();
         final String instId = 
StringUtils.isEmpty(controllerFacade.getInstanceId()) ? "" : 
controllerFacade.getInstanceId();

Reply via email to