public class HttpTracing
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
HttpTracing.Builder |
Modifier and Type | Method | Description |
---|---|---|
HttpTracing |
clientOf(java.lang.String serverName) |
Scopes this component for a client of the indicated server.
|
HttpClientParser |
clientParser() |
|
HttpSampler |
clientSampler() |
Returns an overriding sampling decision for a new trace.
|
static HttpTracing |
create(Tracing tracing) |
|
static HttpTracing.Builder |
newBuilder(Tracing tracing) |
|
java.lang.String |
serverName() |
Used by http clients to indicate the name of the destination service.
|
HttpServerParser |
serverParser() |
|
HttpSampler |
serverSampler() |
Returns an overriding sampling decision for a new trace.
|
HttpTracing.Builder |
toBuilder() |
|
Tracing |
tracing() |
public static HttpTracing create(Tracing tracing)
public static HttpTracing.Builder newBuilder(Tracing tracing)
public Tracing tracing()
public HttpClientParser clientParser()
public java.lang.String serverName()
When present, a link from Tracing.Builder.localServiceName(String)
to this name
will increment for each traced client call.
As this is endpoint-specific, it is typical to create a scoped instance of HttpTracing to assign this value. For example:
github = TracingHttpClientBuilder.create(httpTracing.serverName("github"));
public HttpTracing clientOf(java.lang.String serverName)
serverName()
public HttpServerParser serverParser()
public HttpSampler clientSampler()
trace ID instead
.
This decision happens when a trace was not yet started in process. For example, you may be making an http request as a part of booting your application. You may want to opt-out of tracing client requests that did not originate from a server request.
public HttpSampler serverSampler()
trace ID instead
.
This decision happens when trace IDs were not in headers, or a sampling decision has not yet been made. For example, if a trace is already in progress, this function is not called. You can implement this to skip paths that you never want to trace.
public HttpTracing.Builder toBuilder()
Copyright © 2018 OpenZipkin. All rights reserved.