Create Sampling Rule
xray_create_sampling_rule | R Documentation |
Creates a rule to control sampling behavior for instrumented applications¶
Description¶
Creates a rule to control sampling behavior for instrumented
applications. Services retrieve rules with get_sampling_rules
, and
evaluate each rule in ascending order of priority for each request. If
a rule matches, the service records a trace, borrowing it from the
reservoir size. After 10 seconds, the service reports back to X-Ray with
get_sampling_targets
to get updated versions of each in-use rule. The
updated rule contains a trace quota that the service can use instead of
borrowing from the reservoir.
Usage¶
Arguments¶
SamplingRule
[required] The rule definition.
Tags
A map that contains one or more tag keys and tag values to attach to an X-Ray sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference.
The following restrictions apply to tags:
Maximum number of user-applied tags per resource: 50
Maximum tag key length: 128 Unicode characters
Maximum tag value length: 256 Unicode characters
Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
Tag keys and values are case sensitive.
Don't use
aws:
as a prefix for keys; it's reserved for Amazon Web Services use.
Value¶
A list with the following syntax:
list(
SamplingRuleRecord = list(
SamplingRule = list(
RuleName = "string",
RuleARN = "string",
ResourceARN = "string",
Priority = 123,
FixedRate = 123.0,
ReservoirSize = 123,
ServiceName = "string",
ServiceType = "string",
Host = "string",
HTTPMethod = "string",
URLPath = "string",
Version = 123,
Attributes = list(
"string"
)
),
CreatedAt = as.POSIXct(
"2015-01-01"
),
ModifiedAt = as.POSIXct(
"2015-01-01"
)
)
)
Request syntax¶
svc$create_sampling_rule(
SamplingRule = list(
RuleName = "string",
RuleARN = "string",
ResourceARN = "string",
Priority = 123,
FixedRate = 123.0,
ReservoirSize = 123,
ServiceName = "string",
ServiceType = "string",
Host = "string",
HTTPMethod = "string",
URLPath = "string",
Version = 123,
Attributes = list(
"string"
)
),
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)