HttpRuleSamplerpublic abstract class HttpSampler
extends java.lang.Object
Ex. Here's a sampler that only traces api requests
{@code
httpTracingBuilder.serverSampler(new HttpSampler() {HttpRuleSampler| Modifier and Type | Field | Description |
|---|---|---|
static HttpSampler |
NEVER_SAMPLE |
Returns false to never start new traces for http requests.
|
static HttpSampler |
TRACE_ID |
Ignores the request and uses the
trace ID instead. |
| Constructor | Description |
|---|---|
HttpSampler() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract <Req> java.lang.Boolean |
trySample(HttpAdapter<Req,?> adapter,
Req request) |
Returns an overriding sampling decision for a new trace.
|
public static final HttpSampler TRACE_ID
trace ID instead.public static final HttpSampler NEVER_SAMPLE
@Nullable public abstract <Req> java.lang.Boolean trySample(HttpAdapter<Req,?> adapter, Req request)
trace ID sampler.Copyright © 2018 OpenZipkin. All rights reserved.