zipkin-zookeeper:ZooKeeper collection-tier sampler
zipkin-kubernetes:Kubernetes integration with OpenZipkin
fabric8io/kubernetes-zipkin
Financial-Times/zipkin-helm:A helm chart for zipkin
zipkin-layout-factory:Spring Boot Layout Factory for Zipkin Server derivatives
openzipkin/docker-zipkin:Docker images for OpenZipkin
Brave:Brave 是用来装备 Java 程序的类库,提供了面向标准Servlet、Spring MVC、Http Client、JAX RS、Jersey、Resteasy 和 MySQL 等接口的装备能力,可以通过编写简单的配置和代码,让基于这些框架构建的应用可以向 Zipkin 报告数据。同时 Brave 也提供了非常简单且标准化的接口,在以上封装无法满足要求的时候可以方便扩展与定制。
openzipkin
sudo docker build -t openzipkin/zipkin-kafka .
sudo docker run -it -d -p 2181:2181 -p 9092:9092 -e KAFKA_ADVERTISED_HOST_NAME=192.168.1.100 openzipkin/zipkin-kafka
sh bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test2
sh kafka-run-class.sh kafka.tools.ConsoleProducer --broker-list localhost:9092 --topic test2
sh kafka-run-class.sh kafka.tools.ConsoleConsumer --bootstrap-server localhost:9092 --topic test2 --from-beginning
sudo docker run -it -d -p 3306:3306 openzipkin/zipkin-mysql
schema:https://github.com/openzipkin/zipkin/blob/master/zipkin-storage/mysql/src/main/resources/mysql.sql
sudo docker build -t openzipkin/zipkin .
sudo docker run -it -p 9411:9411 -e STORAGE_TYPE=mysql -e MYSQL_HOST=192.168.1.100 -e MYSQL_USER=zipkin -e MYSQL_PASS=zipkin -e KAFKA_ZOOKEEPER=192.168.1.100:2181 -e KAFKA_TOPIC=zipkin openzipkin/zipkin
spring:
zipkin.kafka.topic: zipkin
kafka:
bootstrap-servers:
- localhost:9092
Baggage travels with the trace (every child span contains the baggage of its parent). Zipkin has no knowledge of baggage and does not receive that information.
Tags are attached to a specific span. In other words, they are presented only for that particular span. However, you can search by tag to find the trace, assuming a span having the searched tag value exists.
If you want to be able to lookup a span based on baggage, you should add a corresponding entry as a tag in the root span.
Spring Cloud Sleuth 分为两个模块,spring-cloud-sleuth-core和spring-cloud-sleuth-zipkin;spring-cloud-sleuth-core基于Zipkin和brave构建,但是可以认为其是一个跟Zipkin同级别的框架,他只是使用了Zipkin和Brave的API简化了自己的工作量;这个模块的主要功能是为Spring生态中的各个组件提供链路追踪的能力,并在使用SLF4J框架记录日志时添加到日志的头部;这个模块是借用并扩展了Zipkin的概念和API;
2016-02-02 15:30:57.902 INFO [bar,6bfd228dc00d216b,6bfd228dc00d216b,false] 23030 --- [nio-8081-exec-3] ...
[appname,traceId,spanId,exportable]
spring-cloud-sleuth-zipkin这个模块提供了跟Zipkin整合的能力,具体就是提供了将spring-cloud-sleuth-core模块中的Span在合适的时间点发送给Zipkin Server;目前实现了Web(LoadBalancerClient/RestTemplate)/Kafka/Rabbit三种形式;
参考
Brave接入ZipKin实现调用链跟踪【上】