[+] Metrics (#95)

* Add actuator and micrometer

* update

* [-] Remove unused import

* [O] Make code less verbose

* format

* refactor

---------

Co-authored-by: Azalea <22280294+hykilpikonna@users.noreply.github.com>
This commit is contained in:
Menci
2024-12-13 05:47:31 +08:00
committed by GitHub
parent 8434842c65
commit c5dad11e5e
15 changed files with 225 additions and 54 deletions

View File

@@ -33,3 +33,11 @@ spring.jpa.hibernate.ddl-auto=none
# https://github.com/termstandard/colors#truecolor-support-in-output-devices
# If you want to read the logs using a script, read the json logs in `logs` folder instead.
spring.output.ansi.enabled=always
# Metrics
management.server.port=8081
management.endpoint.prometheus.enabled=true
management.endpoints.web.exposure.include=prometheus
management.metrics.distribution.percentiles.http.server.requests=0.5, 0.75, 0.9, 0.95, 0.99
management.metrics.distribution.percentiles.tasks.scheduled.execution=0.5, 0.75, 0.9, 0.95, 0.99
management.metrics.distribution.percentiles.spring.data.repository.invocations=0.5, 0.75, 0.9, 0.95, 0.99