Slide 1

Slide 1 text

Zipkin -n- OpenTracing @adrianfcole #zipkin

Slide 2

Slide 2 text

Introduction introduction zipkin opentracing wrapping up @adrianfcole #zipkin

Slide 3

Slide 3 text

@adrianfcole • spring cloud at pivotal • focused on distributed tracing • helped open zipkin

Slide 4

Slide 4 text

Zipkin introduction zipkin opentracing wrapping up @adrianfcole #zipkin

Slide 5

Slide 5 text

Zipkin is a distributed tracing system

Slide 6

Slide 6 text

Zipkin has pluggable architecture Tracers report spans HTTP or Kafka. Servers collect spans, storing them in MySQL, Cassandra, or Elasticsearch. Users query for traces via Zipkin’s Web UI or Api. services: storage: image: openzipkin/zipkin-elasticsearch container_name: elasticsearch ports: - 9300:9300 server: image: openzipkin/zipkin environment: - STORAGE_TYPE=elasticsearch - ES_HOSTS=elasticsearch ports: - 9411:9411 depends_on: - storage

Slide 7

Slide 7 text

Zipkin has starter architecture Tracing is new for a lot of folks. For many, the MySQL option is a good start, as it is familiar. services: storage: image: openzipkin/zipkin-mysql container_name: mysql ports: - 3306:3306 server: image: openzipkin/zipkin environment: - STORAGE_TYPE=mysql - MYSQL_HOST=mysql ports: - 9411:9411 depends_on: - storage

Slide 8

Slide 8 text

Zipkin can be as simple as a single file $ curl -SL 'https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec' > zipkin.jar $ SELF_TRACING_ENABLED=true java -jar zipkin.jar . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.4.0.RELEASE) 2016-08-01 18:50:07.098 INFO 8526 --- [ main] zipkin.server.ZipkinServer : Starting ZipkinServer on acole with PID 8526 (/Users/acole/oss/sleuth-webmvc-example/zipkin.jar started by acole in /Users/acole/oss/sleuth-webmvc- example) —snip— $ curl -s localhost:9411/api/v1/services|jq . [ "zipkin-server" ]

Slide 9

Slide 9 text

Zipkin lives in GitHub Zipkin was created by Twitter in 2012. In 2015, OpenZipkin became the primary fork. OpenZipkin is an org on GitHub. It contains tracers, OpenApi spec, service components and docker images. https://github.com/openzipkin

Slide 10

Slide 10 text

OpenTracing introduction zipkin opentracing wrapping up @adrianfcole #zipkin

Slide 11

Slide 11 text

• Trace sampling is before the fact • Client and server spans can share a span ID • Spans are reported in Thrift or Json • Trace identifiers are propagated as X-B3 http headers • This is very important for interop! • Arbitrary baggage is out-of-scope Zipkin defines a span and propagation format.

Slide 12

Slide 12 text

• Logs map to (String, timestampMicros) [Annotation] • Tags map to (String, String) [BinaryAnnotation] • Tags special-case RPC details such as role and peer • When RPC, start/end events are recorded Mapping OpenTracing to Zipkin Span

Slide 13

Slide 13 text

• zipkin-go-opentracing - 1st party OpenTracing tracer • brave-opentracing - experimental propagation bridge • uber/jaeger-client-* - some need B3 and reporter Zipkin compatible OpenTracing libraries

Slide 14

Slide 14 text

• zipkin-reporter-java - reporting side • zipkin-api - struct definitions • b3-propagation - documents propagation concerns • of course.. http://zipkin.io/pages/instrumenting.html Helpful repositories

Slide 15

Slide 15 text

Wrapping Up introduction zipkin opentracing wrapping up @adrianfcole #zipkin

Slide 16

Slide 16 text

Wrapping up You can use OpenTracing to send traces to a Zipkin system. Support B3. With it, you’ll be compatible with any Zipkin tracer. Remember you are not alone! @adrianfcole #zipkin gitter.im/openzipkin/zipkin zipkin-go-opentracing example