Skip to content

Latest commit

 

History

History
45 lines (36 loc) · 2.67 KB

README.md

File metadata and controls

45 lines (36 loc) · 2.67 KB

Gitter chat Build Status Download

zipkin-java

This project is a native java port of zipkin, which was historically written in scala+finagle. This includes a dependency-free library and a spring-boot replacement for zipkin's query server. Storage options include in-memory, JDBC (mysql), Cassandra, and Elasticsearch.

Library

The core library requires minimum language level 7. While currently only used by the server, we expect this library to be used in native instrumentation as well.

This includes built-in codec for both thrift and json structs. Direct dependencies on thrift or moshi (json library) are avoided by minifying and repackaging classes used. The result is a 256k jar which won't conflict with any library you use.

Ex.

// your instrumentation makes a span
archiver = BinaryAnnotation.create(LOCAL_COMPONENT, "archiver", Endpoint.create("service", 127 << 24 | 1));
span = new Span.Builder()
    .traceId(1L)
    .name("targz")
    .id(1L)
    .timestamp(epochMicros())
    .duration(durationInMicros)
    .addBinaryAnnotation(archiver);

// Now, you can encode it as json or thrift
bytes = Codec.JSON.writeSpan(span);
bytes = Codec.THRIFT.writeSpan(span);

Server

The spring-boot server receives spans via HTTP POST and respond to queries from zipkin-web. It is a drop-in replacement for the scala query service, passing the same tests (via the interop module).

To run the server from the currently checked out source, enter the following.

$ ./mvnw -pl zipkin-server spring-boot:run

Note that the server requires minimum JRE 8.

Artifacts

Library Releases

Releases are uploaded to Bintray.

Library Snapshots

Snapshots are uploaded to JFrog after commits to master.

Docker Images

Released versions of zipkin-server are published to Docker Hub as openzipkin/zipkin-java. See docker-zipkin-java for details.