public final class ZipkinSender
extends java.lang.Object
implements io.jaegertracing.spi.Sender
ZipkinV2Reporter.
Example usage:
reporter = new RemoteReporter(ZipkinSender.create("http://localhost:9411/api/v1/spans"));
tracer = new JaegerTracer.Builder(serviceName, reporter, sampler)
...
See https://github.com/openzipkin/zipkin/tree/master/zipkin-server
| Modifier and Type | Method and Description |
|---|---|
int |
append(io.jaegertracing.internal.JaegerSpan span) |
int |
close() |
static ZipkinSender |
create(zipkin2.reporter.Sender delegate)
Use this to dispatch to an existing Zipkin sender which is configured for
thrift encoding. |
static ZipkinSender |
create(java.lang.String endpoint) |
int |
flush() |
public static ZipkinSender create(java.lang.String endpoint)
endpoint - The POST URL for zipkin's v1 api,
usually "http://zipkinhost:9411/api/v1/spans"public static ZipkinSender create(zipkin2.reporter.Sender delegate)
thrift encoding.
Ex. for Kafka ("io.zipkin2.reporter:zipkin-sender-kafka11")
sender = ZipkinSender.create(
KafkaSender.newBuilder()
.encoding(Encoding.THRIFT)
.bootstrapServers("192.168.99.100:9092")
.build()
);
delegate - indicates an alternate sender library than URLConnectionSenderpublic int append(io.jaegertracing.internal.JaegerSpan span)
throws io.jaegertracing.internal.exceptions.SenderException
append in interface io.jaegertracing.spi.Senderio.jaegertracing.internal.exceptions.SenderExceptionpublic int flush()
throws io.jaegertracing.internal.exceptions.SenderException
flush in interface io.jaegertracing.spi.Senderio.jaegertracing.internal.exceptions.SenderExceptionpublic int close()
throws io.jaegertracing.internal.exceptions.SenderException
close in interface io.jaegertracing.spi.Senderio.jaegertracing.internal.exceptions.SenderException