From 2f49b0c31d1ef1d80b091d789be5f8f51d906c11 Mon Sep 17 00:00:00 2001
From: buildmaster
![]() | Important |
|---|---|
Starting with version |
Brave is a library used to capture and report latency information about distributed operations to Zipkin. +For your convenience, we embed part of the Brave’s docs here.
![]() | Important |
|---|---|
In the vast majority of cases you need to just use the |
Brave is a library used to capture and report latency information about distributed operations to Zipkin. Most users do not use Brave directly. They use libraries or frameworks rather than employ Brave on their behalf.
This module includes a tracer that creates and joins spans that model the latency of potentially distributed work. It also includes libraries to propagate the trace context over network boundaries (for example, with HTTP headers).
Most importantly, you need a brave.Tracer, configured to report to Zipkin.
The following example setup sends trace data (spans) to Zipkin over HTTP (as opposed to Kafka):
class MyClass { @@ -111,4 +113,4 @@ oneWayReceive.start().flush(); // you should not modify this span anymore as it is complete. However, // you can create children to represent follow-up work. -next = tracer.newSpan(oneWayReceive.context()).name("step2").start();
![]() | Note |
|---|---|
The propagation logic shown in the preceding example is a simplified version of our [http handlers](https://github.com/openzipkin/sleuth/tree/master/instrumentation/http#http-server). |
You can find a working example of a one-way span [here](src/test/java/sleuth/features/async/OneWaySpanTest.java).