From 1970caca6d96bb691f496dcbcd462587a88f4da5 Mon Sep 17 00:00:00 2001 From: abotev-intracol Date: Mon, 1 Oct 2018 18:46:05 +0300 Subject: [PATCH] NY-3443 Implement prometheus in microservices - add metrics dependencies and configure metrics endpoints in yaml files; Signed-off-by: abotev-intracol --- pom.xml | 9 +++++++++ src/main/resources/application-dev.yml | 18 +++++++++++++++++- src/main/resources/application-production.yml | 18 +++++++++++++++++- 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b28a877..9f00670 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,15 @@ groovy-all + + io.micrometer + micrometer-core + + + + io.micrometer + micrometer-registry-prometheus + diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index c033fac..9019371 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -13,4 +13,20 @@ spring: complete: pending: account: - timeout-minutes: 30 \ No newline at end of file + timeout-minutes: 30 + +#Metrics related configurations +management: + endpoint: + metrics: + enabled: true + prometheus: + enabled: true + endpoints: + web: + exposure: + include: 'prometheus, health, info' + metrics: + export: + prometheus: + enabled: true \ No newline at end of file diff --git a/src/main/resources/application-production.yml b/src/main/resources/application-production.yml index 30cd816..cefd4fd 100644 --- a/src/main/resources/application-production.yml +++ b/src/main/resources/application-production.yml @@ -13,4 +13,20 @@ spring: complete: pending: account: - timeout-minutes: ${COMPLETE_PENDING_ACCOUNT_TIMEOUT_MINUTES:30} \ No newline at end of file + timeout-minutes: ${COMPLETE_PENDING_ACCOUNT_TIMEOUT_MINUTES:30} + +#Metrics related configurations +management: + endpoint: + metrics: + enabled: true + prometheus: + enabled: true + endpoints: + web: + exposure: + include: 'prometheus, health, info' + metrics: + export: + prometheus: + enabled: true \ No newline at end of file -- GitLab