Java distributed tracing implementation compatible with Zipkin backend services.
Java Other
Clone or download
Permalink
Failed to load latest commit information.
.github Corrects to the normal zipkin contributing file (#468) Aug 12, 2017
.mvn/wrapper Bumps dependency versions Jan 6, 2018
brave-bom [maven-release-plugin] prepare for next development iteration Jun 21, 2018
brave-tests [maven-release-plugin] prepare for next development iteration Jun 21, 2018
brave [maven-release-plugin] prepare for next development iteration Jun 21, 2018
build-support Removes all deprecated things (Brave v5) (#708) May 22, 2018
context [maven-release-plugin] prepare for next development iteration Jun 21, 2018
instrumentation [maven-release-plugin] prepare for next development iteration Jun 21, 2018
spring-beans [maven-release-plugin] prepare for next development iteration Jun 21, 2018
src/it Rewrites all major Brave instrumentation using new apis (#350) May 6, 2017
travis Uses travis to deploy instead of CircleCI Jan 25, 2018
.gitignore Adds gRPC client and server interceptors Mar 15, 2016
.settings.xml Uses OpenZipkin deploy process and migrates to io.zipkin.brave group … May 19, 2016
.travis.yml Adds spring amqp instrumentation (#603) Mar 3, 2018
HACKING.md Makes implicit change culture transparent (#287) Dec 10, 2016
LICENSE Update LICENSE (Apache 2.0). Apr 28, 2013
README.md Fixes READMEs Mar 5, 2018
RELEASE.md Uses travis to deploy instead of CircleCI Jan 25, 2018
circle.yml Uses travis to deploy instead of CircleCI Jan 25, 2018
mvnw Bumps dependency versions Jan 6, 2018
mvnw.cmd Bumps dependency versions Jan 6, 2018
pom.xml [maven-release-plugin] prepare for next development iteration Jun 21, 2018

README.md

Build Status Maven Central Gitter chat

Brave

Brave is a library used to capture latency information about distributed operations. It reports this data to Zipkin as spans.

Zipkin is based on Dapper. Dapper (dutch) = Brave (english)... So, that's where the name comes from.

You can look at our example project for how to trace a simple web application.

What's included

Brave's dependency-free tracer library works against JRE6+. This is the underlying api that instrumentation use to time operations and add tags that describe them. This library also includes code that parses X-B3-TraceId headers.

Most users won't write tracing code directly. Rather, they reuse instrumentation others have written. Check our instrumentation and Zipkin's list before rolling your own. Common tracing libraries like JDBC, Servlet and Spring already exist. Instrumentation written here are tested and benchmarked.

If you are trying to trace legacy applications, you may be interested in Spring XML Configuration. This allows you to setup tracing without any custom code.

You may want to put trace IDs into your log files, or change thread local behavior. Look at our context libraries, for integration with tools such as SLF4J.

Artifacts

All artifacts publish to the group ID "io.zipkin.brave". We use a common release version for all components.

Library Releases

Releases are uploaded to Bintray and synchronized to Maven Central

Library Snapshots

Snapshots are uploaded to JFrog after commits to master.

Version alignments

When using multiple brave components, you'll want to align versions in one place. This allows you to more safely upgrade, with less worry about conflicts.

You can use our Maven instrumentation BOM (Bill of Materials) for this:

Ex. in your dependencies section, import the BOM like this:

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.zipkin.brave</groupId>
        <artifactId>brave-bom</artifactId>
        <version>${brave.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

Now, you can leave off the version when choosing any supported instrumentation. Also any indirect use will have versions aligned:

<dependency>
  <groupId>io.zipkin.brave</groupId>
  <artifactId>brave-instrumentation-okhttp3</artifactId>
</dependency>

With the above in place, you can use the properties brave.version, zipkin-reporter.version or zipkin.version to override dependency versions coherently. This is most commonly to test a new feature or fix.

Note: If you override a version, always double check that your version is valid (equal to or later) than what you are updating. This will avoid class conflicts.