strimzi / metrics-reporter

Prometheus Metrics Reporter for Apache Kafka server and client compoenents
Apache License 2.0
4 stars 7 forks source link

Apply metric filtering when adding and removing metrics instead of in the collect method #36

Closed OwenCorrigan76 closed 1 month ago

OwenCorrigan76 commented 1 month ago

Thie PR adds applying the filtering when adding/removing metrics in KafkaPrometheusMetricsReporter instead of doing it in KafkaMetricsCollector.collect() which runs when the /metrics endpoint is hit so it's on the hot path. It refers to the following issue: https://github.com/strimzi/metrics-reporter/issues/9