- 后端:集成 Prometheus

This commit is contained in:
YunaiV
2019-05-18 20:25:07 +08:00
parent 17614d4265
commit 7905541501
5 changed files with 49 additions and 1 deletions

View File

@@ -65,6 +65,21 @@
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>io.prometheus</groupId>-->
<!-- <artifactId>simpleclient_spring_boot</artifactId>-->
<!-- </dependency>-->
<!-- 测试相关 -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -0,0 +1,9 @@
package cn.iocoder.mall.admin.application.config;
import org.springframework.context.annotation.Configuration;
@Configuration
//@EnablePrometheusEndpoint
//@EnableSpringBootMetricsCollector
public class MonitorConfiguration {
}

View File

@@ -32,3 +32,11 @@ swagger:
description: 管理员子系统
version: 1.0.0
base-package: cn.iocoder.mall.admin.application.controller
management:
endpoints:
web:
exposure:
include: health,info,env,metrics,prometheus
metrics:
enabled: true