Package zipkin2.reporter.okhttp3
Class OkHttpSender.Builder
java.lang.Object
zipkin2.reporter.okhttp3.OkHttpSender.Builder
- Enclosing class:
- OkHttpSender
public static final class OkHttpSender.Builder extends Object
-
Method Summary
Modifier and Type Method Description OkHttpSenderbuild()okhttp3.OkHttpClient.BuilderclientBuilder()OkHttpSender.BuildercompressionEnabled(boolean compressionEnabled)Default true.OkHttpSender.BuilderconnectTimeout(int connectTimeoutMillis)Sets the default connect timeout (in milliseconds) for new connections.OkHttpSender.Builderencoding(zipkin2.codec.Encoding encoding)Use this to change the encoding used in messages.OkHttpSender.Builderendpoint(String endpoint)No default.OkHttpSender.Builderendpoint(okhttp3.HttpUrl endpoint)OkHttpSender.BuildermaxRequests(int maxRequests)Maximum in-flight requests.OkHttpSender.BuildermessageMaxBytes(int messageMaxBytes)Maximum size of a message.OkHttpSender.BuilderreadTimeout(int readTimeoutMillis)Sets the default read timeout (in milliseconds) for new connections.OkHttpSender.BuilderwriteTimeout(int writeTimeoutMillis)Sets the default write timeout (in milliseconds) for new connections.
-
Method Details
-
endpoint
No default. The POST URL for zipkin's v2 api, usually "http://zipkinhost:9411/api/v2/spans" -
endpoint
-
compressionEnabled
Default true. true implies that spans will be gzipped before transport. -
messageMaxBytes
Maximum size of a message. Default 500KB -
maxRequests
Maximum in-flight requests. Default 64 -
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.
-
connectTimeout
Sets the default connect timeout (in milliseconds) for new connections. Default 10000 -
readTimeout
Sets the default read timeout (in milliseconds) for new connections. Default 10000 -
writeTimeout
Sets the default write timeout (in milliseconds) for new connections. Default 10000 -
clientBuilder
public okhttp3.OkHttpClient.Builder clientBuilder() -
build
-