-
- All Implemented Interfaces:
-
com.datadog.trace.api.sampling.SamplingRule,com.datadog.trace.api.sampling.SamplingRule.TraceSamplingRule
public final class TraceSamplingRules.Rule implements SamplingRule.TraceSamplingRule
-
-
Method Summary
Modifier and Type Method Description StringgetService()Gets the glob pattern the span service must match to validate the rule. StringgetName()Gets the glob pattern the span name must match to validate the rule. StringgetResource()Gets the glob pattern the span resource must match to validate the rule. Map<String, String>getTags()Gets the collection of all (tag name, glob pattern) pairs that span tags must match to validatethe rules. doublegetSampleRate()Gets the probability of keeping (sampling) the element matching the rule. static TraceSamplingRules.Rulecreate(TraceSamplingRules.JsonRuleĀ jsonRule)Validate and create a Rule from its JsonRule representation. StringasStringJsonRule()-
-
Method Detail
-
getService
String getService()
Gets the glob pattern the span service must match to validate the rule.
-
getResource
String getResource()
Gets the glob pattern the span resource must match to validate the rule.
-
getTags
Map<String, String> getTags()
Gets the collection of all (tag name, glob pattern) pairs that span tags must match to validatethe rules. If the collection is empty, the rule will be validated. If the collection hasentries, each key must exactly match a span tag name, and its associated glob pattern mustmatch the span tag value.
-
getSampleRate
double getSampleRate()
Gets the probability of keeping (sampling) the element matching the rule.
-
create
static TraceSamplingRules.Rule create(TraceSamplingRules.JsonRuleĀ jsonRule)
Validate and create a Rule from its JsonRule representation.
- Parameters:
jsonRule- The JsonRule to validate.
-
asStringJsonRule
String asStringJsonRule()
-
-
-
-