Interface SamplingDecision

All Known Implementing Classes:
SamplingDecision.Capture, SamplingDecision.CaptureDownsampled, SamplingDecision.Drop

Outcome of an EventSamplingPolicy.sample(com.tnsai.quality.sampling.SamplingInput) call (issue #82).

Sealed so the publisher's dispatch is exhaustive. SamplingDecision.Capture = full-fidelity capture; SamplingDecision.Drop = silently discard; SamplingDecision.CaptureDownsampled = capture but mark with the effective sampling rate so downstream aggregators (Prometheus, Datadog) can compensate when reporting volume.

Since:
0.5.0 (issue #82)
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Capture this event at full fidelity.
    static final record 
    Capture but flag as downsampled.
    static final record 
    Drop this event entirely — no publication.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Cheap helper: short-circuit "should I publish?"
  • Method Details

    • shouldPublish

      default boolean shouldPublish()
      Cheap helper: short-circuit "should I publish?" check.