Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Dropwizard Zipkin Bundle

Build Status Maven Central GitHub license Become a Patron

A bundle for submitting tracing data to Zipkin from Dropwizard applications. Internally, this library uses Brave to interface a Zipkin collector.

Dependency Info


Beginning with v1.2.2-4, if you are using the Kafka sender, you must explicitly add the kafka-clients dependency into your pom.xml as it has been excluded from the zipkin-core module.



Add a ZipkinBundle to your Application class.

private ZipkinBundle<HelloWorldConfiguration> zipkinBundle;

public void initialize(Bootstrap<HelloWorldConfiguration> bootstrap) {
  zipkinBundle = new ZipkinBundle<HelloWorldConfiguration>(getName()) {
    public ZipkinFactory getZipkinFactory(HelloWorldConfiguration configuration) {
      return configuration.getZipkinFactory();

public void run(HelloWorldConfiguration configuration, Environment environment) throws Exception {
  final Optional<HttpTracing> tracing = zipkinBundle.getHttpTracing();


For configuring the Zipkin connection, there is a ZipkinFactory:


  # Required properties
  # Whether tracing is enabled or not (defaults to true)
  enabled: true
  # Listening IP address of the service
  # Listening port of the service
  servicePort: 8080

  # Optional properties
  # Span collector to use (console, http, kafka or empty)
  collector: http
  # If using the http collector, provide the baseUrl
  # If using the http collector, timeout out when connecting (defaults to 10s)
  connectTimeout: 10s
  # If using the http collector, timeout out when reading the response (defaults to 60s)
  readTimeout: 60s
  # If using the kafka collector, provide the Kafka bootstrap servers

Example Application

This bundle includes a modified version of the HelloWorldApplication from Dropwizard's Getting Started documentation.

You can execute this application by first starting Zipkin on your local machine then running:

./mvnw clean package
java -jar zipkin-example/target/zipkin-example-*-SNAPSHOT.jar server zipkin-example/hello-world.yml

This will start the application on port 8080 (admin port 8180). This application demonstrations the following Zipkin integration points:

  • You can use the included ZipkinClientBuilder to construct an instrumented JerseyClient's that will send span traces to Zipkin
  • The service will send request and response traces to Zipkin


Please file bug reports and feature requests in GitHub issues.


Copyright (c) 2020 Smoke Turner, LLC

This library is licensed under the Apache License, Version 2.0.

See or the LICENSE file in this repository for the full license text.