redpanda
redpanda copied to clipboard
Check if public_metrics are enabled
Check if disable_public_metrics is set and in this case do not register the available_memory related metrics on the public metrics endpoint.
Cover letter
Without this change, the metrics show up on the public endpoint even when that endpoint is disabled.
Backport Required
- [ ] not a bug fix
- [ ] issue does not exist in previous branches
- [ ] papercut/not impactful enough to backport
- [x] v22.3.x
- [ ] v22.2.x
- [ ] v22.1.x
Release notes
- none
Improvements
Metrics do not show up in public_metrics when endpoint is disabled.