Commit 4e17b70e by shuhu.hou

Merge remote-tracking branch 'origin/master'

parents 573bd297 1a9e83e8
...@@ -98,7 +98,12 @@ ...@@ -98,7 +98,12 @@
<artifactId>apollo-client</artifactId> <artifactId>apollo-client</artifactId>
<version>1.4.0</version> <version>1.4.0</version>
</dependency> </dependency>
<!-- promtheus -->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_spring_boot</artifactId>
<version>0.6.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -14,6 +14,8 @@ package cn.freemud; ...@@ -14,6 +14,8 @@ package cn.freemud;
import cn.freemud.utils.LogTreadLocal; import cn.freemud.utils.LogTreadLocal;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import io.prometheus.client.spring.boot.EnablePrometheusEndpoint;
import io.prometheus.client.spring.boot.EnableSpringBootMetricsCollector;
import org.jasypt.encryption.StringEncryptor; import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
...@@ -43,6 +45,8 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy; ...@@ -43,6 +45,8 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
@EnableAspectJAutoProxy @EnableAspectJAutoProxy
@ComponentScan({"cn.freemud","com.freemud"}) @ComponentScan({"cn.freemud","com.freemud"})
@EnableFeignClients @EnableFeignClients
@EnablePrometheusEndpoint
@EnableSpringBootMetricsCollector
@EnableAutoConfiguration @EnableAutoConfiguration
public class ApiApplication { public class ApiApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -8,4 +8,15 @@ app.id=SHOP_OPEN_STORE ...@@ -8,4 +8,15 @@ app.id=SHOP_OPEN_STORE
apollo.meta=http://212.129.229.203 apollo.meta=http://212.129.229.203
env=dev env=dev
apollo.bootstrap.enabled=true apollo.bootstrap.enabled=true
apollo.bootstrap.namespaces=micro_progeram_commons,i_callback_service apollo.bootstrap.namespaces=micro_progeram_commons,i_callback_service
\ No newline at end of file
endpoints.metrics.enabled=true
endpoints.health.sensitive=false
endpoints.health.enabled=true
management.endpoint.health.show-details=always
management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=prometheus,info,health,shutdown
management.metrics.tags.application=${spring.application.name}
management.endpoint.shutdown.enabled=true
management.security.enabled=false
management.health.rabbit.enabled=false
\ No newline at end of file
...@@ -337,6 +337,13 @@ ...@@ -337,6 +337,13 @@
<artifactId>apm-toolkit-logback-1.x</artifactId> <artifactId>apm-toolkit-logback-1.x</artifactId>
</dependency> </dependency>
<!-- promtheus -->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_spring_boot</artifactId>
<version>0.6.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -15,6 +15,8 @@ package cn.freemud; ...@@ -15,6 +15,8 @@ package cn.freemud;
import cn.freemud.core.db.DataSourcesConfig; import cn.freemud.core.db.DataSourcesConfig;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import io.prometheus.client.spring.boot.EnablePrometheusEndpoint;
import io.prometheus.client.spring.boot.EnableSpringBootMetricsCollector;
import org.jasypt.encryption.StringEncryptor; import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
...@@ -43,6 +45,8 @@ import tk.mybatis.spring.annotation.MapperScan; ...@@ -43,6 +45,8 @@ import tk.mybatis.spring.annotation.MapperScan;
@MapperScan({"cn.freemud.*.dao","com.freemud.sdk.api.assortment.orderdistributor.mapper","com.freemud.api.assortment.datamanager.manager", @MapperScan({"cn.freemud.*.dao","com.freemud.sdk.api.assortment.orderdistributor.mapper","com.freemud.api.assortment.datamanager.manager",
"com.freemud.api.assortment.datamanager.queue.dao","com.freemud.api.assortment.datamanager.rbac.dao","com.freemud.api.assortment.datamanager.queue.entity"}) "com.freemud.api.assortment.datamanager.queue.dao","com.freemud.api.assortment.datamanager.rbac.dao","com.freemud.api.assortment.datamanager.queue.entity"})
@EnableFeignClients({"cn.freemud.service.thirdparty","com.freemud.sdk.api.assortment.message"}) @EnableFeignClients({"cn.freemud.service.thirdparty","com.freemud.sdk.api.assortment.message"})
@EnablePrometheusEndpoint
@EnableSpringBootMetricsCollector
@EnableAutoConfiguration @EnableAutoConfiguration
public class OrderApplication { public class OrderApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -12,4 +12,15 @@ apollo.bootstrap.enabled=true ...@@ -12,4 +12,15 @@ apollo.bootstrap.enabled=true
apollo.bootstrap.namespaces=micro_progeram_commons,order_service apollo.bootstrap.namespaces=micro_progeram_commons,order_service
eureka.client.enabled=false eureka.client.enabled=false
#-Dapollo.configService=http://172.81.231.147 #-Dapollo.configService=http://172.81.231.147
\ No newline at end of file
endpoints.metrics.enabled=true
endpoints.health.sensitive=false
endpoints.health.enabled=true
management.endpoint.health.show-details=always
management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=prometheus,info,health,shutdown
management.metrics.tags.application=${spring.application.name}
management.endpoint.shutdown.enabled=true
management.security.enabled=false
management.health.rabbit.enabled=false
\ No newline at end of file
...@@ -290,6 +290,24 @@ ...@@ -290,6 +290,24 @@
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId> <artifactId>apm-toolkit-logback-1.x</artifactId>
</dependency> </dependency>
<!-- promtheus -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-spring-legacy</artifactId>
</dependency>
<!-- promtheus -->
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_spring_boot</artifactId>
<version>0.6.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -15,6 +15,8 @@ package cn.freemud; ...@@ -15,6 +15,8 @@ package cn.freemud;
import cn.freemud.core.db.DataSourcesConfig; import cn.freemud.core.db.DataSourcesConfig;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import io.prometheus.client.spring.boot.EnablePrometheusEndpoint;
import io.prometheus.client.spring.boot.EnableSpringBootMetricsCollector;
import org.jasypt.encryption.StringEncryptor; import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
...@@ -46,6 +48,8 @@ import tk.mybatis.spring.annotation.MapperScan; ...@@ -46,6 +48,8 @@ import tk.mybatis.spring.annotation.MapperScan;
"com.freemud.api.assortment.datamanager.manager"}) "com.freemud.api.assortment.datamanager.manager"})
@EnableFeignClients @EnableFeignClients
@EnableAsync @EnableAsync
@EnablePrometheusEndpoint
@EnableSpringBootMetricsCollector
public class ShoppingCartApplication { public class ShoppingCartApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(ShoppingCartApplication.class, args); SpringApplication.run(ShoppingCartApplication.class, args);
......
...@@ -11,8 +11,16 @@ apollo.cluster=local ...@@ -11,8 +11,16 @@ apollo.cluster=local
apollo.bootstrap.enabled=true apollo.bootstrap.enabled=true
apollo.bootstrap.namespaces=micro_progeram_commons,shopping_cart apollo.bootstrap.namespaces=micro_progeram_commons,shopping_cart
management.endpoints.web.exposure.include=health,info,env,metrics,prometheus
management.health.rabbit.enabled=false endpoints.metrics.enabled=true
management.endpoints.web.base-path=/ endpoints.health.sensitive=false
endpoints.health.enabled=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.metrics.tags.application=${spring.application.name} management.endpoints.web.base-path=/
\ No newline at end of file management.endpoints.web.exposure.include=prometheus,info,health,shutdown
management.metrics.tags.application=${spring.application.name}
management.endpoint.shutdown.enabled=true
management.security.enabled=false
management.health.rabbit.enabled=false
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment