Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

What changes did we need to make to the source code in the microservices to make them produce metrics that are consumed by Prometheus?

Pragya Keshap answered on February 17, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


What changes did we need to make to the source code in the microservices to make them produce metrics that are consumed by Prometheus?

0

 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-registry￾prometheus")

• 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"

Popularity 1/10 Helpfulness 1/10 Language whatever
Source: Grepper
Link to this answer
Share Copy Link
Contributed on Feb 17 2023
Pragya Keshap
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.