The following changes were applied to the source code:
• A build dependency for the micrometer library was added to the
build.gradle build file:
implementation("io.micrometer:micrometer-registryprometheus")
• Annotations were added to the Pod templates in the Deployment
objects to let Prometheus know where to find the metrics:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "4004"
prometheus.io/scheme: http
prometheus.io/path: "/actuator/prometheus"