This moves to changes made in preparation of zipkin 1.0. Here are the notables: * Zipkin has autoconfiguration modules, where maven artifacts have the prefix 'zipkin-autoconfigure-X' * Zipkin's ui now shares a version with everything else * Zipkin now namespaces packages and configuration. ex zipkin.storage.X as opposed to zipkin.X * All autoconfiguration classes are prefixed `Zipkin` to be easier to find * Zipkin binds components like StorageComponent, as opposed to individual classes like SpanStore. * Health checks are under the scope "zipkin" and broken down by component * UI responsiveness is better by conditionally caching names queries for 5 minutes * New `Collector` class, which makes logging and metrics patterns the same regardless of transport
35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
# Running Zipkin Server
|
|
|
|
There are 3 parts to Zipkin: the instrumented client apps, the backend database and the Zipkin server. The database for this implementation is MySQL.
|
|
|
|
> There is a running instance on PWS: http://zipkin-web.cfapps.io. It is backed by a `zipkin-server` with a MySQL backend and RabbitMQ (Spring Cloud Stream) for span transport.
|
|
|
|
## Instrumenting Apps
|
|
|
|
Depend on [Spring Cloud Sleuth Stream](https://github.com/spring-cloud-spring-cloud-sleuth). Bind to a rabbit service (or redis if you prefer - normal Spring Cloud Stream process).
|
|
|
|
## Zipkin Server
|
|
|
|
Depend on `spring-cloud-sleuth-zipkin-stream` and enable the server:
|
|
|
|
```java
|
|
@SpringBootApplication
|
|
@EnableZipkinStreamServer
|
|
public class ZipkinStreamServerApplication {
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
SpringApplication.run(ZipkinStreamServerApplication.class, args);
|
|
}
|
|
|
|
}
|
|
```
|
|
|
|
Zipkin has a web UI, which is enabled by default when you depend on `io.zipkin.java:zipkin-autoconfigure-ui`.
|
|
|
|
Bind to MySQL and the same Stream service that you did in the apps (rabbit, redis, kafka). Set `spring.datasource.initialize=true` the first time you start to initialize the database.
|
|
|
|
Uses the `zipkin-server` library from the [OSS](https://github.com/openzipkin/zipkin-java) as well as `spring-cloud-sleuth-stream`.
|
|
|
|
> NOTE: running in the "test" profile you don't need MySQL (the span store is in memory). You could even run in PWS without MySQL.
|
|
|