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
tracing:
zipkin:
enabled: true
http:
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
tracing:
zipkin:
enabled: true
http:
urls:
- http://foo:9411
- 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.