Enum Class DurationInstrumentationMode
java.lang.Object
java.lang.Enum<DurationInstrumentationMode>
io.github.teceli.resiliencia.opentelemetry.DurationInstrumentationMode
- All Implemented Interfaces:
Serializable,Comparable<DurationInstrumentationMode>,Constable
How
OpenTelemetryResilienceMetrics records duration metrics
(resilience.timeout.duration, resilience.circuitbreaker.calls).
Unlike Micrometer's percentile histograms, there is no "don't opt in" lever available to
resiliencia's own code for the OTel SDK's default histogram aggregation:
DoubleExplicitBucketHistogramAggregator synchronizes on every recorded value, unconditionally
(see docs/architecture/metrics/metrics.md's "Backend audit" section). This closed,
two-value enum keeps the safe default enforced by the API shape itself, rather than a
consumer-supplied strategy that could reintroduce the same unbounded risk.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDuration recorded viaDoubleHistogram.record(...), yielding full percentile/ distribution data, with the documented per-callsynchronizedpinning risk from the OTel SDK's default explicit-bucket histogram aggregation.Duration recorded as a lock-free counter pair — a count and a summed duration, both backed byLongSumAggregator/DoubleSumAggregator. -
Method Summary
Modifier and TypeMethodDescriptionstatic DurationInstrumentationModeReturns the enum constant of this class with the specified name.static DurationInstrumentationMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SAFE
Duration recorded as a lock-free counter pair — a count and a summed duration, both backed byLongSumAggregator/DoubleSumAggregator. Mean is derivable (sum / count) by the backend at query time; no percentile/distribution data; zero per-call pinning risk by construction. Default. -
DETAILED
Duration recorded viaDoubleHistogram.record(...), yielding full percentile/ distribution data, with the documented per-callsynchronizedpinning risk from the OTel SDK's default explicit-bucket histogram aggregation. Explicit opt-in only.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-