This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
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 AWS CloudFormation template, use the following syntax:
JSON
{ "Attributes" :{, "FixedRate" :Key:Value, ...}Number, "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:ValueNumberHost:StringHTTPMethod:StringPriority:IntegerReservoirSize:IntegerResourceARN:StringRuleARN:StringRuleName:StringServiceName:StringServiceType:StringURLPath:StringVersion: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: Object of String
Pattern:
.{1,}Update requires: No interruption
FixedRate-
The percentage of matching requests to instrument, after the reservoir is exhausted.
Required: Yes
Type: Number
Minimum:
0Maximum:
1Update requires: No interruption
Host-
Matches the hostname from a request URL.
Required: Yes
Type: String
Maximum:
64Update requires: No interruption
HTTPMethod-
Matches the HTTP method of a request.
Required: Yes
Type: String
Maximum:
10Update requires: No interruption
Priority-
The priority of the sampling rule.
Required: Yes
Type: Integer
Minimum:
1Maximum:
9999Update 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: Yes
Type: Integer
Minimum:
0Update requires: No interruption
ResourceARN-
Matches the ARN of the AWS resource on which the service runs.
Required: Yes
Type: String
Maximum:
500Update requires: No interruption
RuleARN-
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
Note
Specifying a sampling rule by name is recommended, as specifying by ARN will be deprecated in future.
Required: Conditional
Type: String
Update requires: No interruption
RuleName-
The name of the sampling rule. Specify a rule by either name or ARN, but not both.
Required: Conditional
Type: String
Minimum:
1Maximum:
32Update requires: No interruption
ServiceName-
Matches the
namethat the service uses to identify itself in segments.Required: Yes
Type: String
Maximum:
64Update requires: No interruption
ServiceType-
Matches the
originthat the service uses to identify its type in segments.Required: Yes
Type: String
Maximum:
64Update requires: No interruption
URLPath-
Matches the path from a request URL.
Required: Yes
Type: String
Maximum:
128Update requires: No interruption
Version-
The version of the sampling rule.
Versioncan only be set when creating a new sampling rule.Required: Conditional
Type: Integer
Minimum:
1Update requires: Replacement