This is a very simple Java class that shows the use of the Zipkin Brave Java tracer client with SignalFx. See ./src/main/java/com/signalfx/tracing/examples/brave/App.java for the code and more information.
To build this example, simply run mvn package
. This will create a Jar
file that you can run with:
java -DaccessToken=MY_ORG_ACCESS_TOKEN -jar ./target/brave-example-1.0-SNAPSHOT-shaded.jar
Provide your SignalFx organization's access token in the accessToken
property. This will run the example app and send a single trace with
the service name signalfx-zipkin-brave-example
with four spans.
If you want to see what errors look like, you can pass the property
-DthrowError=yes
and an exception will occur within the parent span.
Brave's README file in the main Brave repository is the best starting point for more information on using the tracer. You can look at the various sampler implementations that come included with Brave.
Zipkin Brave has a good example project that goes into more detail on how to use the tracer, as well as how to propagate span context across processes.
Finally, explore Brave's list of supported instrumentations that come built in with the Brave library.