Class AllSamplingStrategy

java.lang.Object
com.amazonaws.xray.strategy.sampling.AllSamplingStrategy
All Implemented Interfaces:
SamplingStrategy

public class AllSamplingStrategy extends Object implements SamplingStrategy
A sampling strategy for which shouldTrace always returns true. Use this sampling strategy to trace every request.
  • Constructor Details

    • AllSamplingStrategy

      public AllSamplingStrategy()
  • Method Details

    • shouldTrace

      public SamplingResponse shouldTrace(SamplingRequest samplingRequest)
      Specified by:
      shouldTrace in interface SamplingStrategy
    • isForcedSamplingSupported

      public boolean isForcedSamplingSupported()
      Description copied from interface: SamplingStrategy
      Returns whether or not this sampling strategy supports 'forced sampling'. Forced sampling allows a segment's initial non-sampled decision to be later overriden to sampled. Supporting this feature requires that all segments, sampled or otherwise, be kept in memory for the duration of their existence. Not supporting this feature saves memory and computational capacity.
      Specified by:
      isForcedSamplingSupported in interface SamplingStrategy
      Returns:
      whether or not forced sampling is supported