You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by zh...@apache.org on 2023/02/23 06:18:26 UTC
[shenyu] branch master updated: support shenyu-admin expose prometheus metrics (#4336)
This is an automated email from the ASF dual-hosted git repository.
zhangzicheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new ea130205a support shenyu-admin expose prometheus metrics (#4336)
ea130205a is described below
commit ea130205a46bcfb1f9d0fb7f3983a4689742b101
Author: tomsun28 <to...@outlook.com>
AuthorDate: Thu Feb 23 14:18:20 2023 +0800
support shenyu-admin expose prometheus metrics (#4336)
Co-authored-by: dragon-zhang <zh...@apache.org>
Co-authored-by: likeguo <33...@users.noreply.github.com>
---
shenyu-admin/pom.xml | 9 +++++++--
shenyu-admin/src/main/resources/application.yml | 10 ++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/shenyu-admin/pom.xml b/shenyu-admin/pom.xml
index 8f875539d..75fa0bcf7 100644
--- a/shenyu-admin/pom.xml
+++ b/shenyu-admin/pom.xml
@@ -260,12 +260,17 @@
<version>${commons-io.version}</version>
</dependency>
+ <dependency>
+ <groupId>io.micrometer</groupId>
+ <artifactId>micrometer-registry-prometheus</artifactId>
+ </dependency>
+
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
</dependencies>
-
+
<profiles>
<profile>
<id>release</id>
@@ -282,7 +287,7 @@
</build>
</profile>
</profiles>
-
+
<build>
<finalName>shenyu-admin</finalName>
<plugins>
diff --git a/shenyu-admin/src/main/resources/application.yml b/shenyu-admin/src/main/resources/application.yml
index d2388e005..f787d31b7 100755
--- a/shenyu-admin/src/main/resources/application.yml
+++ b/shenyu-admin/src/main/resources/application.yml
@@ -30,6 +30,15 @@ spring:
pathmatch:
matching-strategy: ant_path_matcher
+management:
+ endpoints:
+ web:
+ exposure:
+ include:
+ - 'health'
+ - 'prometheus'
+ enabled-by-default: true
+
mybatis:
config-location: classpath:/mybatis/mybatis-config.xml
mapper-locations: classpath:/mappers/*.xml
@@ -92,6 +101,7 @@ shenyu:
- /websocket
- /error
- /actuator/health
+ - /actuator/prometheus
- /swagger-ui.html
- /webjars/**
- /swagger-resources/**