Skip to content

Commit 8003509

Browse files
authored
SamplerType now public. (helidon-io#3788)
* SamplerType now public. * Fix JavaDoc for Sampler type.
1 parent 405716c commit 8003509

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

tracing/jaeger/src/main/java/io/helidon/tracing/jaeger/JaegerTracerBuilder.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021 Oracle and/or its affiliates.
2+
* Copyright (c) 2019, 2022 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -640,13 +640,34 @@ private void flushIntervalMs(Long aLong) {
640640
this.reporterFlushIntervalMillis = aLong;
641641
}
642642

643-
enum SamplerType {
643+
/**
644+
* Sampler type definition.
645+
* Available options are "const", "probabilistic", "ratelimiting" and "remote".
646+
*/
647+
public enum SamplerType {
648+
/**
649+
* Constant sampler always makes the same decision for all traces.
650+
* It either samples all traces {@code 1} or none of them {@code 0}.
651+
*/
644652
CONSTANT("const"),
653+
/**
654+
* Probabilistic sampler makes a random sampling decision with the
655+
* probability of sampling equal to the value of the property.
656+
*/
645657
PROBABILISTIC("probabilistic"),
658+
/**
659+
* Rate Limiting sampler uses a leaky bucket rate limiter to ensure that
660+
* traces are sampled with a certain constant rate.
661+
*/
646662
RATE_LIMITING("ratelimiting"),
663+
/**
664+
* Remote sampler consults Jaeger agent for the appropriate sampling
665+
* strategy to use in the current service.
666+
*/
647667
REMOTE("remote");
648668
private final String config;
649669

670+
650671
SamplerType(String config) {
651672
this.config = config;
652673
}

0 commit comments

Comments
 (0)