Class CentralizedSamplingStrategy
- java.lang.Object
-
- com.amazonaws.xray.strategy.sampling.CentralizedSamplingStrategy
-
- All Implemented Interfaces:
SamplingStrategy
- Direct Known Subclasses:
DefaultSamplingStrategy
public class CentralizedSamplingStrategy extends java.lang.Object implements SamplingStrategy
-
-
Constructor Summary
Constructors Constructor Description CentralizedSamplingStrategy()
CentralizedSamplingStrategy(boolean forcedSamplingSupport)
CentralizedSamplingStrategy(@Nullable java.net.URL ruleLocation)
CentralizedSamplingStrategy(@Nullable java.net.URL ruleLocation, boolean forcedSamplingSupport)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getClientID()
@Nullable java.net.URL
getSamplingManifestURL()
boolean
isForcedSamplingSupported()
Returns whether or not this sampling strategy supports 'forced sampling'.SamplingResponse
shouldTrace(SamplingRequest samplingRequest)
void
shutdown()
Shutdown additional resources created by advanced sampling strategies.
-
-
-
Constructor Detail
-
CentralizedSamplingStrategy
public CentralizedSamplingStrategy()
-
CentralizedSamplingStrategy
public CentralizedSamplingStrategy(@Nullable java.net.URL ruleLocation)
-
CentralizedSamplingStrategy
public CentralizedSamplingStrategy(boolean forcedSamplingSupport)
-
CentralizedSamplingStrategy
public CentralizedSamplingStrategy(@Nullable java.net.URL ruleLocation, boolean forcedSamplingSupport)
-
-
Method Detail
-
getSamplingManifestURL
public @Nullable java.net.URL getSamplingManifestURL()
-
shouldTrace
public SamplingResponse shouldTrace(SamplingRequest samplingRequest)
- Specified by:
shouldTrace
in interfaceSamplingStrategy
-
shutdown
public void shutdown()
Description copied from interface:SamplingStrategy
Shutdown additional resources created by advanced sampling strategies.- Specified by:
shutdown
in interfaceSamplingStrategy
-
getClientID
public static java.lang.String getClientID()
-
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 interfaceSamplingStrategy
- Returns:
- whether or not forced sampling is supported
-
-