I want to load my Spring Cloud zipkin-server with elasticsearch. I think, I tried almost everything I could. but, It still running with in-memory. (when I restart zipkin-server, all data is lost.) I want to set up zipkin with elasticsearch. Please tell me which exact dependencies and applicartion.yml or any other things needed.
Asked
Active
Viewed 4,104 times
3 Answers
1
Creating custom zipkin servers is an unsupported configuration, but if you must all of the configuration options are documented in the project readme: https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md

Brian Devins-Suresh
- 114
- 1
- 1
- 6
1
For the dependencies part, the most important one is zipkin-autoconfigure-storage-elasticsearch-http, here's an full maven pom.xml example:
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>zipkin-server</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>zipkin-server</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<spring-cloud.version>Dalston.SR1</spring-cloud.version>
<zipkin.version>1.23.2</zipkin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-collector-kafka10</artifactId>
<version>1.26.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-kafka</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-storage-elasticsearch-http</artifactId>
<version>${zipkin.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
For the configuration part, you will need the following in you application.yml:
zipkin:
storage:
type: elasticsearch
elasticsearch:
hosts: localhost:9200

evanwoods
- 79
- 4
0
I configured zipkin to use ES as a data storage on top of kubernetes. If it fits your requirement feel free to download and use https://github.com/handysofts/zipkin-on-kubernetes

Vasif
- 668
- 4
- 10