Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
FROM harbor.dcos.guangzhou.unicom.local/eshop/skywalking_agent_springboot_8.1.0:v1.0
|
||||
FROM harbor.dcos.guangzhou.unicom.local/eshop/jdk8_springboot_agent:v1.6
|
||||
ENV LC_ALL=zh_CN.utf8
|
||||
ENV LANG=zh_CN.utf8
|
||||
ENV LANGUAGE=zh_CN.utf8
|
||||
@ -7,4 +7,4 @@ RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
|
||||
RUN mkdir -p /model
|
||||
COPY /target/classes/model/. /model/
|
||||
ADD /target/biz_service_ebtp_extend-0.0.1.jar /biz_service_ebtp_extend-0.0.1.jar
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=test", "-jar", "/biz_service_ebtp_extend-0.0.1.jar"]
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-javaagent:/skywalking/agent/skywalking-agent.jar", "-Dspring.profiles.active=test", "-jar", "/biz_service_ebtp_extend-0.0.1.jar"]
|
||||
|
@ -47,6 +47,10 @@ spec:
|
||||
# Apollo 配置中心变量设置
|
||||
- name: APOLLO_CONFIGSERVICE
|
||||
value: http://10.242.37.1488:6001
|
||||
- name: SW_AGENT_COLLECTOR_BACKEND_SERVICES
|
||||
value: skywalking-oap-cluster.skywalking:11800
|
||||
- name: SW_AGENT_NAME
|
||||
value: biz-service-ebtp-extend
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.chinaunicom.mall.ebtp.extend;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
@ -14,6 +16,7 @@ import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
|
||||
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import io.micrometer.core.instrument.MeterRegistry;
|
||||
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, DruidDataSourceAutoConfigure.class })
|
||||
@EnableFeignClients
|
||||
@ -32,4 +35,16 @@ public class BizServiceEbtpExtendApplication {
|
||||
return IdUtil.getSnowflake(23, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* Grafana 注册项
|
||||
*
|
||||
* @param applicationName 应用名称, 用于grafana应用列表
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public MeterRegistryCustomizer<MeterRegistry> configurer(
|
||||
@Value("${spring.application.name}") String applicationName) {
|
||||
return (registry) -> registry.config().commonTags("application", applicationName);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user