Micrometer Prometheus integration¶
Micrometer is an instrumentation library that provides a facade for application Metrics, allowing developers to expose monitoring data to Prometheus without being tightly coupled to the Prometheus client directly.^[400-devops__03-Containerization__prometheus.md]
Integration¶
To enable Prometheus Metrics in a Java application, the micrometer-registry-prometheus dependency must be included in the project configuration.^[400-devops__03-Containerization__prometheus.md]
For Maven-based projects, the following runtime dependency is added:
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<scope>runtime</scope>
</dependency>
Role in Monitoring¶
Once integrated, Micrometer handles the collection and transformation of metric data into a format that Prometheus can scrape. This setup is commonly used within Kubernetes environments to monitor application performance alongside infrastructure Metrics.^[400-devops__03-Containerization__prometheus.md]
Related Concepts¶
Sources¶
400-devops__03-Containerization__prometheus.md