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 Sender
Reports 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 classSender
-
messageSizeInBytes
public int messageSizeInBytes(int encodedSizeInBytes)
- Overrides:
messageSizeInBytesin classSender
-
messageMaxBytes
public int messageMaxBytes()
- Specified by:
messageMaxBytesin classSender
-
sendSpans
public zipkin2.Call<Void> sendSpans(List<byte[]> encodedSpans)
The returned call sends spans as a POST toURLConnectionSender.Builder.endpoint.
-
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
-
-