- 后端:集成 Prometheus
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package cn.iocoder.mall.admin.application.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
//@EnablePrometheusEndpoint
|
||||
//@EnableSpringBootMetricsCollector
|
||||
public class MonitorConfiguration {
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user