فهرست منبع

content-service 启用 actuator 提供监控数据

reghao 9 ماه پیش
والد
کامیت
2cb516411c
2فایلهای تغییر یافته به همراه11 افزوده شده و 11 حذف شده
  1. 2 2
      content/content-service/pom.xml
  2. 9 9
      content/content-service/src/main/resources/application.yml

+ 2 - 2
content/content-service/pom.xml

@@ -176,7 +176,7 @@
             <version>1.7.0</version>
         </dependency>
 
-        <!--<dependency>
+        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
@@ -187,7 +187,7 @@
         <dependency>
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-registry-prometheus</artifactId>
-        </dependency>-->
+        </dependency>
     </dependencies>
 
     <profiles>

+ 9 - 9
content/content-service/src/main/resources/application.yml

@@ -41,12 +41,12 @@ eureka:
   client:
     register-with-eureka: true
     fetch-registry: true
-#management:
-#  endpoints:
-#    web:
-#      base-path: /api/content/actuator
-#      exposure:
-#        include: "*"
-#  metrics:
-#    tags:
-#      application: ${spring.application.name}
+management:
+  endpoints:
+    web:
+      base-path: /api/content/actuator
+      exposure:
+        include: "*"
+  metrics:
+    tags:
+      application: ${spring.application.name}