Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.44 KB

README.md

File metadata and controls

55 lines (39 loc) · 1.44 KB

dropwizard-brave

Integrating Dropwizard to Zipkin tracer using Brave

Description

This project uses Brave jersey filters to integrate into Zipkin.

This Dropwizard bundle that will add in the servlet filter for you. Jersey client filters have to be manually added to your client classes.

Integrating with existing dropwizard project

Add the following dependency into your pom.xml

<dependency>
    <groupId>com.github.rojanu</groupId>
    <artifactId>dropwizard-brave</artifactId>
    <version>0.1-SNAPSHOT</version>
</dependency>

Add BraveTraceConfiguration into your application's configuration class.

public class ExampleConfiguration extends Configuration {

    private BraveTraceConfiguration braveTraceConfiguration = new BraveTraceConfiguration();

    public BraveTraceConfiguration getBraveTraceConfiguration() {
        return braveTraceConfiguration;
    }

    public void setRequestTrackerConfiguration(BraveTraceConfiguration configuration) {
        this.braveTraceConfiguration = configuration;
    }
}

Add the BraveBundle to your application

bootstrap.addBundle(new BraveBundle<ExampleConfiguration>() {
    @Override
    public BraveTraceConfiguration getBraveTraceConfiguration(ExampleConfiguration exampleConfiguration) {
        return exampleConfiguration.getBraveTraceConfiguration();
    }
});

and mvn clean install