public class SamplingService extends Object implements BootService
SamplingService take charge of how to sample the TraceSegment. Every TraceSegments
have been traced, but, considering CPU cost of serialization/deserialization, and network bandwidth, the agent do NOT
send all of them to collector, if SAMPLING is on.
By default, SAMPLING is on, and Config.Agent#SAMPLE_N_PER_3_SECS
| Constructor and Description |
|---|
SamplingService() |
| Modifier and Type | Method and Description |
|---|---|
void |
boot() |
void |
forceSampled()
Increase the sampling factor by force,
to avoid sampling too many traces.
|
void |
onComplete() |
void |
prepare() |
void |
shutdown() |
boolean |
trySampling() |
public void prepare()
throws Throwable
prepare in interface BootServiceThrowablepublic void boot()
throws Throwable
boot in interface BootServiceThrowablepublic void onComplete()
throws Throwable
onComplete in interface BootServiceThrowablepublic void shutdown()
throws Throwable
shutdown in interface BootServiceThrowablepublic boolean trySampling()
public void forceSampled()
Copyright © 2019 The Apache Software Foundation. All rights reserved.