exceptionfactory commented on code in PR #10501:
URL: https://github.com/apache/nifi/pull/10501#discussion_r2544600547
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/prometheusutil/PrometheusMetricsUtil.java:
##########
@@ -90,11 +89,11 @@ public static CollectorRegistry
createNifiMetrics(NiFiMetricsRegistry nifiMetric
instanceId, componentType, componentName, componentId,
parentPGId);
// Report metrics for child process groups if specified
- if (METRICS_STRATEGY_PG.getValue().equals(metricsStrategy) ||
METRICS_STRATEGY_COMPONENTS.getValue().equals(metricsStrategy)) {
+ if (ALL_PROCESS_GROUPS.equals(metricsStrategy) ||
ALL_COMPONENTS.equals(metricsStrategy)) {
status.getProcessGroupStatus().forEach((childGroupStatus) ->
createNifiMetrics(nifiMetricsRegistry, childGroupStatus, instanceId,
componentId, "ProcessGroup", metricsStrategy));
}
- if (METRICS_STRATEGY_COMPONENTS.getValue().equals(metricsStrategy)) {
+ if (ALL_COMPONENTS.equals(metricsStrategy)) {
Review Comment:
```suggestion
if (ALL_COMPONENTS == metricsStrategy) {
```
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/prometheusutil/PrometheusMetricsUtil.java:
##########
@@ -90,11 +89,11 @@ public static CollectorRegistry
createNifiMetrics(NiFiMetricsRegistry nifiMetric
instanceId, componentType, componentName, componentId,
parentPGId);
// Report metrics for child process groups if specified
- if (METRICS_STRATEGY_PG.getValue().equals(metricsStrategy) ||
METRICS_STRATEGY_COMPONENTS.getValue().equals(metricsStrategy)) {
+ if (ALL_PROCESS_GROUPS.equals(metricsStrategy) ||
ALL_COMPONENTS.equals(metricsStrategy)) {
Review Comment:
```suggestion
if (ALL_PROCESS_GROUPS == metricsStrategy || ALL_COMPONENTS ==
metricsStrategy) {
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]