Package zipkin2.reporter.urlconnection
Class URLConnectionSender
- java.lang.Object
-
- zipkin2.Component
-
- zipkin2.reporter.Sender
-
- zipkin2.reporter.urlconnection.URLConnectionSender
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class URLConnectionSender extends zipkin2.reporter.SenderReports spans to Zipkin, using its POST endpoint.This sender is thread-safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classURLConnectionSender.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description zipkin2.CheckResultcheck()Sends an empty json message to the configured endpoint.voidclose()static URLConnectionSendercreate(String endpoint)Creates a sender that postsEncoding.JSONmessages.zipkin2.codec.Encodingencoding()intmessageMaxBytes()intmessageSizeInBytes(int encodedSizeInBytes)intmessageSizeInBytes(List<byte[]> encodedSpans)static URLConnectionSender.BuildernewBuilder()zipkin2.Call<Void>sendSpans(List<byte[]> encodedSpans)The returned call sends spans as a POST toURLConnectionSender.Builder.endpoint.URLConnectionSender.BuildertoBuilder()StringtoString()
-
-
-
Method Detail
-
create
public static URLConnectionSender create(String endpoint)
Creates a sender that postsEncoding.JSONmessages.
-
newBuilder
public static URLConnectionSender.Builder newBuilder()
-
toBuilder
public URLConnectionSender.Builder toBuilder()
-
messageSizeInBytes
public int messageSizeInBytes(List<byte[]> encodedSpans)
- Specified by:
messageSizeInBytesin classzipkin2.reporter.Sender
-
messageSizeInBytes
public int messageSizeInBytes(int encodedSizeInBytes)
- Overrides:
messageSizeInBytesin classzipkin2.reporter.Sender
-
encoding
public zipkin2.codec.Encoding encoding()
- Specified by:
encodingin classzipkin2.reporter.Sender
-
messageMaxBytes
public int messageMaxBytes()
- Specified by:
messageMaxBytesin classzipkin2.reporter.Sender
-
sendSpans
public zipkin2.Call<Void> sendSpans(List<byte[]> encodedSpans)
The returned call sends spans as a POST toURLConnectionSender.Builder.endpoint.- Specified by:
sendSpansin classzipkin2.reporter.Sender
-
check
public zipkin2.CheckResult check()
Sends an empty json message to the configured endpoint.- Overrides:
checkin classzipkin2.Component
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classzipkin2.Component
-
-