Skip to content

Instantly share code, notes, and snippets.

@lysebraate
Created January 31, 2018 09:30
Show Gist options
  • Save lysebraate/0d42845ed404b287e369fbf8f04b04f2 to your computer and use it in GitHub Desktop.
Save lysebraate/0d42845ed404b287e369fbf8f04b04f2 to your computer and use it in GitHub Desktop.
dropwizard-opentracing
GlobalTracer.register(tracer);
DynamicFeature tracing = new ServerTracingDynamicFeature.Builder(tracer)
.withSkipPattern("(\\/app\\/apiadmin\\/ping$|\\/api\\/app\\/v.*\\/view\\/.*$)")
.withTraceSerialization(false)
.build();
env.jersey().register(tracing);
env.servlets()
.addFilter("span-finisher", new SpanFinishingFilter(tracer))
.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
@mcbenjemaa
Copy link

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment