Skip to content

Conversation

Myracle
Copy link
Contributor

@Myracle Myracle commented Sep 17, 2025

What is the purpose of the change

Allowing users to specify a whitelist of metrics to be exposed through the Prometheus reporter.

Brief change log

  • Adding a whiteList configuration option to PrometheusPushGatewayReporterOptions.
  • Filtering metrics in AbstractPrometheusReporter based on the configured whitelist.
  • Adding a unit test to verify the metric filtering functionality.

Verifying this change

Please make sure both new and modified tests in this PR follow the conventions for tests defined in our code quality guide.

This change added tests and can be verified as follows:

(example:)

  • Added test testMetricFilter()

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (docs)

@flinkbot
Copy link
Collaborator

flinkbot commented Sep 17, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build


private final Map<String, AbstractMap.SimpleImmutableEntry<Collector, Integer>>
collectorsWithCountByMetricName = new HashMap<>();

private final List<String> whiteLists = new ArrayList<>();
Copy link
Contributor

@davidradl davidradl Sep 18, 2025

Choose a reason for hiding this comment

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

can we avoid the use of whitelists. google results shows The terms "allow list" or "approved list" are widely considered acceptable alternatives to "whitelist," which can carry pejorative or exclusionary connotations.

@github-actions github-actions bot added the community-reviewed PR has been reviewed by the community. label Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-reviewed PR has been reviewed by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants