整合zipkin 未整合elk

This commit is contained in:
wangiegie@gmail.com 2017-12-31 11:09:22 +08:00
parent 0c2a413c28
commit d6dfc08a40
4 changed files with 20 additions and 1 deletions

View File

@ -60,6 +60,11 @@
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>
<!--zipkin-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency>
</dependencies>
<build>

View File

@ -11,7 +11,11 @@ spring:
enabled: true
profile: ${spring.profiles.active}
label: master
zipkin:
base-url: http://localhost:5002
sleuth:
sampler:
percentage: 1.0
---
spring:
profiles: dev

View File

@ -23,6 +23,14 @@
<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>
</dependencies>
<build>

View File

@ -3,6 +3,7 @@ package com.github.pig.zipkin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import zipkin.server.EnableZipkinServer;
/**
* @author lengleng
@ -11,6 +12,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
*/
@EnableDiscoveryClient
@SpringBootApplication
@EnableZipkinServer
public class PigZipkinElkApplication {
public static void main(String[] args) {