public class SamplerManager
extends java.lang.Object
The SamplerManager manages the Samplers for every appName it encounters. In standard (non auto-app-naming) scenarios, these are just the Samplers for the default app. When auto-app-naming is enabled, a new SamplerCollection is constructed for each appName (actual Sampler instances are not constructed, except in the case of AdaptiveSamplers - see the javadoc for SamplerCollection for more information on how Samplers are shared across apps).
| Constructor and Description |
|---|
SamplerManager(DistributedTracingConfig dtConfig) |
| Modifier and Type | Method and Description |
|---|---|
Sampler |
getSampler(Granularity granularity,
DistributedTraceServiceImpl.SamplerCase samplerCase)
Get the requested sampler from the default sampler collection.
|
Sampler |
getSampler(java.lang.String appName,
Granularity granularity,
DistributedTraceServiceImpl.SamplerCase samplerCase)
Get the requested sampler for the given appName.
|
void |
setDefaultSampler(Granularity granularity,
DistributedTraceServiceImpl.SamplerCase samplerCase,
Sampler newSampler) |
void |
setSampler(java.lang.String appName,
Granularity granularity,
DistributedTraceServiceImpl.SamplerCase samplerCase,
Sampler newSampler) |
void |
setSharedSamplingTargets(int newTarget) |
public SamplerManager(DistributedTracingConfig dtConfig)
public Sampler getSampler(java.lang.String appName, Granularity granularity, DistributedTraceServiceImpl.SamplerCase samplerCase)
public Sampler getSampler(Granularity granularity, DistributedTraceServiceImpl.SamplerCase samplerCase)
public void setSharedSamplingTargets(int newTarget)
public void setSampler(java.lang.String appName,
Granularity granularity,
DistributedTraceServiceImpl.SamplerCase samplerCase,
Sampler newSampler)
public void setDefaultSampler(Granularity granularity, DistributedTraceServiceImpl.SamplerCase samplerCase, Sampler newSampler)