Sending Traces to Zipkin

Using the CLI

If you are creating your project using the Micronaut CLI, supply the tracing-zipkin feature to include Zipkin tracing in your project:

  1. $ mn create-app my-app features tracing-zipkin

To send tracing spans to Zipkin the minimal configuration requires you add the following dependencies to build.gradle or pom.xml:

Adding Zipkin Dependencies

  1. runtime 'io.zipkin.brave:brave-instrumentation-http'
  2. runtime 'io.zipkin.reporter2:zipkin-reporter'
  3. compile 'io.opentracing.brave:brave-opentracing'

Then you need to enable ZipKin tracing in your configuration (potentially only your production configuration):

application.yml

  1. tracing:
  2. zipkin:
  3. enabled: true
Or alternatively if you have the Micronaut CLI installed you can configure Zipkin when creating your service with: mn create-app hello-world —features tracing-zipkin