io.prometheus.client.exemplars.HistogramExemplarSampler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simpleclient Show documentation
Show all versions of simpleclient Show documentation
Core instrumentation library for the simpleclient.
The newest version!
package io.prometheus.client.exemplars;
/**
* Exemplar sampler for histogram metrics.
*/
public interface HistogramExemplarSampler {
/**
* @param value the value to be observed.
* @param bucketFrom upper boundary of the previous bucket in the histogram.
* Will be {@link Double#NEGATIVE_INFINITY} if there is no previous bucket.
* @param bucketTo upper boundary of this histogram bucket.
* Will be {@link Double#POSITIVE_INFINITY} if this is the last bucket.
* @param previous the previously sampled exemplar, or {@code null} if there is none.
* @return an Exemplar to be sampled, or {@code null} if the previous exemplar does not need to be updated.
* Returning {@code null} and returning {@code previous} is equivalent.
*/
Exemplar sample(double value, double bucketFrom, double bucketTo, Exemplar previous);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy