Customizing the Zipkin Sender

In order to send spans you need to configure a Zipkin sender. You can configure a HttpClientSender that sends Spans asynchronously using Micronaut’s native HTTP client using the tracing.zipkin.http.url setting:

Configuring Multiple Zipkin Servers

  1. tracing:
  2. zipkin:
  3. enabled: true
  4. http:
  5. url: http://localhost:9411

It is unlikely that sending spans to localhost will be suitable for production deployment so you generally will want to configure the location of one or many Zipkin servers for production:

Configuring Multiple Zipkin Servers

  1. tracing:
  2. zipkin:
  3. enabled: true
  4. http:
  5. urls:
  6. - http://foo:9411
  7. - http://bar:9411
In production, setting TRACING_ZIPKIN_HTTP_URLS environment variable with a comma separated list of URLs will also work.

Alternatively if you wish to use a different zipkin2.reporter.Sender implementation, you can simply define a bean that is of type zipkin2.reporter.Sender and it will be picked up.