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
47 lines
1.2 KiB
Markdown
47 lines
1.2 KiB
Markdown
# Running a Zipkin Server
|
|
|
|
There are 3 parts to Zipkin:
|
|
|
|
- the instrumented client apps
|
|
- the backend database (defaults to in-memory db)
|
|
- the Zipkin server
|
|
|
|
## Zipkin Services
|
|
|
|
Run the Zipkin (remember to have RabbitMQ running) by
|
|
|
|
either running Spring Boot Maven plugin:
|
|
|
|
```
|
|
./mvnw spring-boot:run --projects spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
|
|
```
|
|
|
|
or running the packaged app from the root:
|
|
|
|
```
|
|
./mvnw package --projects spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
|
|
java -jar spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream/target/spring-cloud-sleuth-sample-zipkin-stream-1.0.0.BUILD-SNAPSHOT-exec.jar
|
|
```
|
|
|
|
and test it
|
|
|
|
```
|
|
$ curl localhost:9411/api/v1/services
|
|
["zipkin-server"]
|
|
```
|
|
|
|
## Instrumenting Apps
|
|
|
|
Depend on [Spring Cloud Sleuth Stream](https://github.com/spring-cloud-spring-cloud-sleuth) and the
|
|
rabbit binder (`spring-cloud-starter-stream-rabbit`).
|
|
|
|
Once the apps start publishing spans they will appear in the span store as well.
|
|
|
|
## Running in an IDE
|
|
|
|
You can run this app in an IDE and still use docker-compose to create the middleware:
|
|
|
|
```
|
|
$ docker-compose up rabbitmq
|
|
```
|