Package zipkin2.reporter.urlconnection
Class URLConnectionSender.Builder
- java.lang.Object
-
- zipkin2.reporter.urlconnection.URLConnectionSender.Builder
-
- Enclosing class:
- URLConnectionSender
public static final class URLConnectionSender.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URLConnectionSenderbuild()URLConnectionSender.BuildercompressionEnabled(boolean compressionEnabled)Default true.URLConnectionSender.BuilderconnectTimeout(int connectTimeout)Default 10 * 1000 milliseconds.URLConnectionSender.Builderencoding(zipkin2.codec.Encoding encoding)Use this to change the encoding used in messages.URLConnectionSender.Builderendpoint(String endpoint)No default.URLConnectionSender.Builderendpoint(URL endpoint)URLConnectionSender.BuildermessageMaxBytes(int messageMaxBytes)Maximum size of a message.URLConnectionSender.BuilderreadTimeout(int readTimeout)Default 60 * 1000 milliseconds.
-
-
-
Method Detail
-
endpoint
public final URLConnectionSender.Builder endpoint(String endpoint)
No default. The POST URL for zipkin's v2 api, usually "http://zipkinhost:9411/api/v2/spans"
-
endpoint
public URLConnectionSender.Builder endpoint(URL endpoint)
-
connectTimeout
public URLConnectionSender.Builder connectTimeout(int connectTimeout)
Default 10 * 1000 milliseconds. 0 implies no timeout.
-
readTimeout
public URLConnectionSender.Builder readTimeout(int readTimeout)
Default 60 * 1000 milliseconds. 0 implies no timeout.
-
compressionEnabled
public URLConnectionSender.Builder compressionEnabled(boolean compressionEnabled)
Default true. true implies that spans will be gzipped before transport.
-
messageMaxBytes
public URLConnectionSender.Builder messageMaxBytes(int messageMaxBytes)
Maximum size of a message. Default 500KB
-
encoding
public URLConnectionSender.Builder encoding(zipkin2.codec.Encoding encoding)
Use this to change the encoding used in messages. Default is Encoding.JSON This also controls the "Content-Type" header when sending spans.Note: If ultimately sending to Zipkin, version 2.8+ is required to process protobuf.
-
build
public final URLConnectionSender build()
-
-