diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/sampling/SamplingService.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/sampling/SamplingService.java index 5777a0443..83c29718a 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/sampling/SamplingService.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/sampling/SamplingService.java @@ -78,8 +78,11 @@ public class SamplingService implements BootService { } /** + * When the sampling mechanism is on and the sample limited is not reached, the trace segment + * should be traced. If the sampling mechanism is off, it means that all trace segments should + * be traced. * @param operationName The first operation name of the new tracing context. - * @return true, if sampling mechanism is on, and getDefault the sampling factor successfully. + * @return true if should sample this trace segment. When sampling mechanism is on, return true if sample limited is not reached. */ public boolean trySampling(String operationName) { if (on) {