AWS::XRay::SamplingRule SamplingRule
A sampling rule that services use to decide whether to instrument a request. Rule fields can match properties of the service, or properties of a request. The service can ignore rules that don't match its properties.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Attributes" :
{
, "FixedRate" :Key
:Value
, ...}Double
, "Host" :String
, "HTTPMethod" :String
, "Priority" :Integer
, "ReservoirSize" :Integer
, "ResourceARN" :String
, "RuleARN" :String
, "RuleName" :String
, "ServiceName" :String
, "ServiceType" :String
, "URLPath" :String
, "Version" :Integer
}
YAML
Attributes:
FixedRate:
Key
:Value
Double
Host:String
HTTPMethod:String
Priority:Integer
ReservoirSize:Integer
ResourceARN:String
RuleARN:String
RuleName:String
ServiceName:String
ServiceType:String
URLPath:String
Version:Integer
Properties
Attributes
-
Matches attributes derived from the request.
Map Entries: Maximum number of 5 items.
Key Length Constraints: Minimum length of 1. Maximum length of 32.
Value Length Constraints: Minimum length of 1. Maximum length of 32.
Required: No
Type: Map of String
Update requires: No interruption
FixedRate
-
The percentage of matching requests to instrument, after the reservoir is exhausted.
Required: No
Type: Double
Update requires: No interruption
Host
-
Matches the hostname from a request URL.
Required: No
Type: String
Maximum:
64
Update requires: No interruption
HTTPMethod
-
Matches the HTTP method of a request.
Required: No
Type: String
Maximum:
10
Update requires: No interruption
Priority
-
The priority of the sampling rule.
Required: No
Type: Integer
Minimum:
1
Maximum:
9999
Update requires: No interruption
ReservoirSize
-
A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.
Required: No
Type: Integer
Minimum:
0
Update requires: No interruption
ResourceARN
-
Matches the ARN of the Amazon resource on which the service runs.
Required: No
Type: String
Maximum:
500
Update requires: No interruption
RuleARN
-
The ARN of the sampling rule. You must specify either RuleARN or RuleName, but not both.
Required: Conditional
Type: String
Update requires: No interruption
RuleName
-
The name of the sampling rule. You must specify either RuleARN or RuleName, but not both.
Required: Conditional
Type: String
Minimum:
1
Maximum:
32
Update requires: No interruption
ServiceName
-
Matches the
name
that the service uses to identify itself in segments.Required: No
Type: String
Maximum:
64
Update requires: No interruption
ServiceType
-
Matches the
origin
that the service uses to identify its type in segments.Required: No
Type: String
Maximum:
64
Update requires: No interruption
URLPath
-
Matches the path from a request URL.
Required: No
Type: String
Maximum:
128
Update requires: No interruption
Version
-
The version of the sampling rule format (
1
).Required: No
Type: Integer
Minimum:
1
Update requires: No interruption