Zurück zum Ranking

openzipkin/brave

Java

Java distributed tracing implementation compatible with Zipkin backend services.

zipkinjavadistributed-tracingtracingzipkin-braveinstrumentationopenzipkin
Sterne-Wachstum
Sterne
2.4k
Forks
715
Wochenwachstum
Issues
117
1k2k
Apr. 2013Sept. 2017Feb. 2022Juli 2026
ArtefakteMavengit clone https://github.com/openzipkin/brave.git
README

Gitter chat Build Status Maven Central

Brave

Brave is a distributed tracing instrumentation library. Brave typically intercepts production requests to gather timing data, correlate and propagate trace contexts. While typically trace data is sent to Zipkin server, third-party plugins are available to send to alternate services such as Amazon X-Ray.

This repository includes dependency-free Java libraries and instrumentation for common components used in production services. For example, this includes trace filters for Servlet and log correlation for Apache Log4J.

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 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 set up 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.

Version Compatibility policy

All Brave libraries match the minimum Java version of what's being traced or integrated with, and adds no 3rd party dependencies. The goal is to neither impact your projects' choices, nor subject your project to dependency decisions made by others.

For example, even including a basic reporting library, zipkin-sender-urlconnection, Brave transitively includes no json, logging, protobuf or thrift dependency. This means zero concern if your application chooses a specific version of SLF4J, Gson or Guava. Moreover, the entire dependency tree including basic reporting in json, thrift or protobuf is less than 512KiB of jars.

There is a floor Java version of 1.6, which allows older JREs and older Android runtimes, yet may limit some applications. For example, Servlet 2.5 works with Java 1.5, but due to Brave being 1.6, you will not be able to trace Servlet 2.5 applications until you use at least JRE 1.6.

All integrations set their associated library to "provided" scope. This ensures Brave doesn't interfere with the versions you choose.

Some libraries update often which leads to api drift. In some cases, we test versions ranges to reduce the impact of this. For example, we test gRPC and Kafka against multiple library versions.

Artifacts

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

Library Releases

Releases are at Maven Central

Library Snapshots

Snapshots are uploaded to Sonatype 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 property brave.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.

Ähnliche Repositories
openzipkin/zipkin

Zipkin is a distributed tracing system

JavaMavenApache License 2.0zipkindistributed-tracing
zipkin.io
17.4k3.1k
twitter/finagle

A fault tolerant, protocol-agnostic RPC system

ScalaApache License 2.0rpcdistributed-systems
twitter.github.io/finagle
8.9k1.4k
dyc87112/SpringCloud-Learning

Spring Cloud基础教程,持续连载更新中

JavaMavenspring-cloudspring-boot
blog.didispace.com
7.4k2.9k
open-telemetry/opentelemetry-rust

The Rust OpenTelemetry implementation

Rustcrates.ioApache License 2.0opentelemetrytracing
opentelemetry.io
2.7k679
spring-petclinic/spring-petclinic-microservices

Distributed version of Spring Petclinic built with Spring Cloud

JavaMavenApache License 2.0spring-cloudmicroservices
2.2k2.8k
zhangxd1989/spring-boot-cloud

基于 Spring Boot、Spring Cloud、Spring Oauth2 和 Spring Cloud Netflix 等框架构建的微服务项目

JavaMaveneurekazuul
2.1k1.1k
census-instrumentation/opencensus-go

A stats collection and distributed tracing framework

GoGo ModulesApache License 2.0gostats
opencensus.io
2k325
spring-attic/spring-cloud-sleuth

Distributed tracing for spring cloud

JavaMavenApache License 2.0javaspring
spring-attic.github.io/spring-cloud-sleuth/
1.8k776
spring-cloud/spring-cloud-sleuth

Distributed tracing for spring cloud

JavaMavenApache License 2.0javaspring
spring.io/projects/spring-cloud-sleuth
1.8k784
yangzongzhuan/RuoYi-Cloud

:tada: (RuoYi)官方仓库 基于Spring Boot、Spring Cloud & Alibaba的分布式微服务架构权限管理系统

JavaMavenMIT Licensejavavue
ruoyi.vip
1.8k919
softwaremill/sttp

The Scala HTTP client you always wanted!

ScalaApache License 2.0scalahttp
sttp.softwaremill.com
1.5k333
lileio/lile

Easily generate gRPC services in Go ⚡️

GoGo ModulesMIT Licensegrpcgo
1.5k85