[#8227] adjust trySampling() comments (#80)

This commit is contained in:
BuYan 2021-12-02 16:40:16 +08:00 committed by GitHub
parent 3b93a9c398
commit 3c967c146b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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) {