Skip to content

Conversation

@esecules
Copy link
Contributor

@esecules esecules commented Nov 6, 2025

Summary

NIFI-15162
This reintroduces the metrics reporting strategy feature from the PrometheusReportingTask. It can be used to only collect flow metrics related to process groups. This will help reduce the CPU load of collection metrics from larger flows when the flow admin wants to omit individual processor and connection metrics already.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • na New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • na New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@esecules esecules force-pushed the NIFI-15162 branch 2 times, most recently from 5c41050 to a4a5004 Compare November 6, 2025 04:51
@exceptionfactory exceptionfactory self-assigned this Nov 10, 2025
Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this improvement @esecules.

The change looks straightforward, I noted a few implementation recommendations.

Eric Secules and others added 3 commits November 17, 2025 08:27
…er to filter what metrics the flow metrics registry emits.
Co-authored-by: David Handermann <[email protected]>
…en generating the flow metrics, fixing docstrings.
@esecules
Copy link
Contributor Author

@exceptionfactory would you like me to squash the 3 commits here into 1 or are we good?

@exceptionfactory
Copy link
Contributor

@exceptionfactory would you like me to squash the 3 commits here into 1 or are we good?

Thanks for asking, no need to squash commits during the review, I can do it when ready on merge.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updates @esecules! This looks close to completion, but I noted where the updated method argument appears to require updating references in the method to change the value comparison, then this should be ready to go forward.

…nitions for the metrics reporting strategy
…cause we do not make use of any of the extra descriptions anymore.
@esecules
Copy link
Contributor Author

Good catch on the equality check @exceptionfactory! I've made the changes and also noticed i could simplify the enum definition for the reporting strategy since we don't make use of the descriptions anywhere since its not a parameter in the UI anymore like it was in the reporting task.

@esecules
Copy link
Contributor Author

I checked the two failing system tests and they both pass on my macbook using java 21 and 25 according to each test failure.

Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the simplified enum approach @esecules, that looks good. I noted one more minor adjustment for equals checking of the enum values, then this should be ready to go.

Co-authored-by: David Handermann <[email protected]>
Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work on this @esecules! +1 merging

@exceptionfactory exceptionfactory merged commit 2e89278 into apache:main Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants