-
Task
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
By default, the Quarkus services expose the metrics endpoint in localhost:8000/q/metrics where 8000 is the server port.
However, the Clowder enviroment expects the endpoint to be on localhost:9000/metrics where 9000 is the "metricsPort" property and "/metrics" is the "metricsPath" property in the clowder config file. Example:
{ "kafka": { "brokers": [ { "hostname": "localhost", "port": 9092 } ], "topics": [] }, "metricsPath": "/metrics", "metricsPort": 9000, "privatePort": 10000, "publicPort": 8000, "webPort": 8000 }
So far, we had a custom ServiceMonitor for Quarkus to redirect from "localhost:8000/q/metrics" to "localhost:9000/metrics". This ServiceMonitor only works in the prod and stage environments, and for the pods with a label "prometheus: quarkus".
The problem is that when porting services from Spring Boot to Quarkus, we can't modify the label (are immutable). This is a known limitation that is meant to be eventually fixed by RHCLOUD-30608.
Moreover, we can't dinamically configure the metrics path because these are managed by build-time properties.
Therefore, the ideal solution is to always configure the metrics path to listen on localhost:9000/metrics, so the behaviour will be the same on ephemeral, stage, and prod environments, and for quarkus and spring services.
This was already done for the swatch-metrics service by SWATCH-2192.
Acceptance Criteria
- Apply the same changes from
SWATCH-2192to all Quarkus services. - Remove the Quarkus Service Monitor for stage and prod from the app-interface repository.
- is related to
-
RHCLOUD-30608 Support defining podSpec.metadata.labels in ClowdApp definitions
- New
-
SWATCH-2192 Fix exposing metrics of the swatch-metrics
- Closed
- mentioned on