public abstract class OkHttpSender extends zipkin.internal.LazyCloseable<okhttp3.OkHttpClient> implements Sender
This sender is thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
OkHttpSender.Builder |
| Modifier and Type | Method and Description |
|---|---|
static OkHttpSender.Builder |
builder() |
zipkin.Component.CheckResult |
check()
Sends an empty json message to the configured endpoint.
|
void |
close()
Waits up to a second for in-flight requests to finish before cancelling them
|
protected okhttp3.OkHttpClient |
compute() |
static OkHttpSender |
create(String endpoint)
Creates a sender that posts
thrift messages. |
int |
messageSizeInBytes(List<byte[]> encodedSpans) |
void |
sendSpans(List<byte[]> encodedSpans,
Callback callback)
Asynchronously sends the spans as a POST to
endpoint(). |
abstract OkHttpSender.Builder |
toBuilder() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitencoding, messageMaxBytespublic static OkHttpSender create(String endpoint)
thrift messages.public static OkHttpSender.Builder builder()
public abstract OkHttpSender.Builder toBuilder()
public int messageSizeInBytes(List<byte[]> encodedSpans)
messageSizeInBytes in interface Senderpublic void sendSpans(List<byte[]> encodedSpans, Callback callback)
endpoint().public zipkin.Component.CheckResult check()
check in interface zipkin.Componentprotected okhttp3.OkHttpClient compute()
compute in class zipkin.internal.Lazy<okhttp3.OkHttpClient>public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface zipkin.Componentclose in class zipkin.internal.LazyCloseable<okhttp3.OkHttpClient>Copyright © 2016–2017 OpenZipkin. All rights reserved.