strimzi / metrics-reporter

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

Cleanup logging #6

Closed mimaison closed 1 month ago

mimaison commented 7 months ago

At the moment there is a lot of logging for debugging purposes. We should clean that up and keep important debugging logs with trace or debug levels.

OwenCorrigan76 commented 1 month ago

@mimaison Do we want to remove all of the LOG.info logs and replace the important ones with trace or debug levels? Since the refactor to update the Prometheus version, there doesn't seem to be as many logs. That said, in the KafkaMetricsCollector and YammerMetricsCollector classes, there is more LOG.info logging that may be unnecssary. For instance: LOG.info("Yammer metric {} is allowed", prometheusMetricName); and LOG.info("labels {}", labels); and maybe: LOG.info("metricName group {}, type {}, name {} converted into {}", metricName.getGroup(), metricName.getType(), metricName.getName(), metricNameStr); Do we need to keep these?

mimaison commented 1 month ago

The point of this ticket is to review the current logging and adjust it so it's relevant and not too verbose, especially at INFO level which is usually the default.

I can't comment on each example. For example, while you were working on the reporter which logs did you find useful?

mimaison commented 1 month ago

Fixed in https://github.com/strimzi/metrics-reporter/pull/33