mirror of https://gitee.com/maxjhandsome/pig
增加zipkin mysql 存储实现
This commit is contained in:
parent
e840818097
commit
f815ff7936
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.github.pig</groupId>
|
||||
<artifactId>pig-zipkin-db</artifactId>
|
||||
<version>${pig.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>pig-zipkin-db</name>
|
||||
<description>zipkin监控模块</description>
|
||||
|
||||
<parent>
|
||||
<groupId>com.github.pig</groupId>
|
||||
<artifactId>pig-visual</artifactId>
|
||||
<version>${pig.version}</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.pig</groupId>
|
||||
<artifactId>pig-common</artifactId>
|
||||
<version>${pig.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-ui</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-server</artifactId>
|
||||
</dependency>
|
||||
<!-- 使用消息的方式收集数据(使用rabbitmq) -->
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-collector-rabbitmq</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-storage-mysql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
package com.github.pig.zipkin;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
||||
import zipkin.server.EnableZipkinServer;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
* @date 2018-01-24
|
||||
* zipkin mysql 存储实现
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableEurekaClient
|
||||
@EnableZipkinServer
|
||||
public class PigZipkinDbApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PigZipkinDbApplication.class, args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
spring:
|
||||
application:
|
||||
name: pig-zipkin-db
|
||||
profiles:
|
||||
active: dev
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
discovery:
|
||||
service-id: pig-config-server
|
||||
enabled: true
|
||||
profile: ${spring.profiles.active}
|
||||
label: ${spring.profiles.active}
|
||||
|
||||
---
|
||||
spring:
|
||||
profiles: dev
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
serviceUrl:
|
||||
defaultZone: http://pig:gip6666@localhost:1025/eureka
|
||||
|
||||
---
|
||||
spring:
|
||||
profiles: prd
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
serviceUrl:
|
||||
defaultZone: http://pig:gip6666@pig-eureka:1025/eureka
|
|
@ -19,6 +19,7 @@
|
|||
<modules>
|
||||
<module>pig-monitor</module>
|
||||
<module>pig-zipkin-elk</module>
|
||||
<module>pig-zipkin-db</module>
|
||||
<!--<module>pig-cache-cloud</module>-->
|
||||
</modules>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue