Skip to content

Commit

Permalink
SamplerType now public. (helidon-io#3788)
Browse files Browse the repository at this point in the history
* SamplerType now public.

* Fix JavaDoc for Sampler type.
  • Loading branch information
dalexandrov authored Jan 19, 2022
1 parent 405716c commit 8003509
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021 Oracle and/or its affiliates.
* Copyright (c) 2019, 2022 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -640,13 +640,34 @@ private void flushIntervalMs(Long aLong) {
this.reporterFlushIntervalMillis = aLong;
}

enum SamplerType {
/**
* Sampler type definition.
* Available options are "const", "probabilistic", "ratelimiting" and "remote".
*/
public enum SamplerType {
/**
* Constant sampler always makes the same decision for all traces.
* It either samples all traces {@code 1} or none of them {@code 0}.
*/
CONSTANT("const"),
/**
* Probabilistic sampler makes a random sampling decision with the
* probability of sampling equal to the value of the property.
*/
PROBABILISTIC("probabilistic"),
/**
* Rate Limiting sampler uses a leaky bucket rate limiter to ensure that
* traces are sampled with a certain constant rate.
*/
RATE_LIMITING("ratelimiting"),
/**
* Remote sampler consults Jaeger agent for the appropriate sampling
* strategy to use in the current service.
*/
REMOTE("remote");
private final String config;


SamplerType(String config) {
this.config = config;
}
Expand Down

0 comments on commit 8003509

Please sign in to comment.