public final class FixedRateSamplingTelemetryProcessor extends java.lang.Object implements TelemetryProcessor
How to use in ApplicationInsights Configuration :
<TelemetryProcessors>
<BuiltInProcessors>
<Processor type = "FixedRateSamplingTelemetryProcessor">
<Add name = "SamplingPercentage" value = "50" />
<ExcludedTypes>
<ExcludedType>Request</ExcludedType>
</ExcludedTypes>
<IncludedTypes>
<IncludedType>Request</IncludedType>
<IncludedType>Trace</IncludedType>
<IncludedType>Dependency</IncludedType>
<IncludedType>Exception</IncludedType>
</IncludedTypes>
</Processor>
</BuiltInProcessors>
</TelemetryProcessors>
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_SAMPLING_PERCENTAGE |
Constructor and Description |
---|
FixedRateSamplingTelemetryProcessor()
constructor is responsible of initializing this processor
to default settings
|
Modifier and Type | Method and Description |
---|---|
void |
addToExcludedType(java.lang.String value)
This method is invoked during configuration to add one element to the
excluded types set from the xml array list of excluded types
|
void |
addToIncludedType(java.lang.String value)
This method is invoked during configuration to add one element to the
included types set from the xml array list of included types
|
java.util.Set<java.lang.Class> |
getExcludedTypes()
This method returns a set of classes of excluded types specified by user
|
java.util.Set<java.lang.Class> |
getIncludedTypes()
This method returns a set of classes of included types specified by user
|
boolean |
process(Telemetry telemetry)
This method determines if the telemetry needs to be sampled or not.
|
void |
setSamplingPercentage(java.lang.String samplingPercentage)
Sets the user defined sampling percentage
|
public static final double DEFAULT_SAMPLING_PERCENTAGE
public FixedRateSamplingTelemetryProcessor()
public java.util.Set<java.lang.Class> getExcludedTypes()
public java.util.Set<java.lang.Class> getIncludedTypes()
public void setSamplingPercentage(java.lang.String samplingPercentage)
samplingPercentage
- public boolean process(Telemetry telemetry)
process
in interface TelemetryProcessor
telemetry
- public void addToExcludedType(java.lang.String value)
value
- public void addToIncludedType(java.lang.String value)
value
-