Vert.x integrates with Zipkin thanks to the Zipkin Brave client.
Vert.x uses the ZipKin HTTP sender based using a Vert.x HTTP Client reporting
spans to http://localhost:9411/api/v2/spans in JSON format.
Vertx vertx = Vertx.vertx(new VertxOptions()
.setTracingOptions(
new ZipkinTracingOptions().setEnabled(true)
)
);
You can configure the sender to use a specific URL
Vertx vertx = Vertx.vertx(new VertxOptions()
.setTracingOptions(
new ZipkinTracingOptions()
.setSenderOptions(new HttpSenderOptions().setSenderEndpoint(senderEndpoint))
.setEnabled(true)
)
);
The default sender uses a single HTTP connection in plain text with compressed bodies.
You can override the configuration of the HTTP sender with custom HttpClientOptions.
Vertx vertx = Vertx.vertx(new VertxOptions()
.setTracingOptions(
new ZipkinTracingOptions()
.setSenderOptions(new HttpSenderOptions()
.setSenderEndpoint(senderEndpoint)
.setSsl(true)
.setKeyCertOptions(sslOptions))
.setEnabled(true)
)
);
Finally you can set a custom ZipKin Tracing allowing for greater control
over the configuration.
Vertx vertx = Vertx.vertx(new VertxOptions()
.setTracingOptions(
new ZipkinTracingOptions(tracing)
.setEnabled(true)
)
);