You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/10/26 17:42:44 UTC

[GitHub] [nifi] mattyb149 commented on a change in pull request #5447: NIFI-8272 Delete stale metrics from REST API Prometheus endpoint.

mattyb149 commented on a change in pull request #5447:
URL: https://github.com/apache/nifi/pull/5447#discussion_r736779420



##########
File path: nifi-nar-bundles/nifi-extension-utils/nifi-prometheus-utils/src/main/java/org/apache/nifi/prometheus/util/PrometheusMetricsUtil.java
##########
@@ -101,20 +98,6 @@ public static CollectorRegistry createNifiMetrics(NiFiMetricsRegistry nifiMetric
         final String componentId = StringUtils.isEmpty(status.getId()) ? DEFAULT_LABEL_STRING : status.getId();
         final String componentName = StringUtils.isEmpty(status.getName()) ? DEFAULT_LABEL_STRING : status.getName();
 
-        // Clear all collectors to deal with removed/renamed components -- for root PG only
-        if("RootProcessGroup".equals(componentType)) {

Review comment:
       This code was explicitly added for the PrometheusReportingTask under [NIFI-6715](https://issues.apache.org/jira/browse/NIFI-6715) and [NIFI-7017](https://issues.apache.org/jira/browse/NIFI-7017). It's my understanding that this PR is meant to have the Prometheus REST endpoint act like PrometheusReportingTask with regards to clearing stale metrics. Does removing this code cause a regression in PromethusReportingTask?

##########
File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/pom.xml
##########
@@ -432,5 +432,9 @@
             <groupId>org.slf4j</groupId>
             <artifactId>jcl-over-slf4j</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-mock</artifactId>

Review comment:
       This should have `test` scope so it doesn't get included with the nifi-web-api artifact




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org