Class CfnSamplingRule.SamplingRuleProperty
A sampling rule that services use to decide whether to instrument a request.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.XRay
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SamplingRuleProperty : Object, CfnSamplingRule.ISamplingRuleProperty
Syntax (vb)
Public Class SamplingRuleProperty
Inherits Object
Implements CfnSamplingRule.ISamplingRuleProperty
Remarks
Rule fields can match properties of the service, or properties of a request. The service can ignore rules that don't match its properties.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.XRay;
var samplingRuleProperty = new SamplingRuleProperty {
FixedRate = 123,
Host = "host",
HttpMethod = "httpMethod",
Priority = 123,
ReservoirSize = 123,
ResourceArn = "resourceArn",
ServiceName = "serviceName",
ServiceType = "serviceType",
UrlPath = "urlPath",
// the properties below are optional
Attributes = new Dictionary<string, string> {
{ "attributesKey", "attributes" }
},
RuleArn = "ruleArn",
RuleName = "ruleName",
Version = 123
};
Synopsis
Constructors
Sampling |
Properties
Attributes | Matches attributes derived from the request. |
Fixed |
The percentage of matching requests to instrument, after the reservoir is exhausted. |
Host | Matches the hostname from a request URL. |
Http |
Matches the HTTP method of a request. |
Priority | The priority of the sampling rule. |
Reservoir |
A fixed number of matching requests to instrument per second, prior to applying the fixed rate. |
Resource |
Matches the ARN of the AWS resource on which the service runs. |
Rule |
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both. |
Rule |
The name of the sampling rule. |
Service |
Matches the |
Service |
Matches the |
Url |
Matches the path from a request URL. |
Version | The version of the sampling rule. |
Constructors
SamplingRuleProperty()
public SamplingRuleProperty()
Properties
Attributes
Matches attributes derived from the request.
public object Attributes { get; set; }
Property Value
System.
Remarks
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.
FixedRate
The percentage of matching requests to instrument, after the reservoir is exhausted.
public double FixedRate { get; set; }
Property Value
System.
Remarks
Host
Matches the hostname from a request URL.
public string Host { get; set; }
Property Value
System.
Remarks
HttpMethod
Matches the HTTP method of a request.
public string HttpMethod { get; set; }
Property Value
System.
Remarks
Priority
The priority of the sampling rule.
public double Priority { get; set; }
Property Value
System.
Remarks
ReservoirSize
A fixed number of matching requests to instrument per second, prior to applying the fixed rate.
public double ReservoirSize { get; set; }
Property Value
System.
Remarks
The reservoir is not used directly by services, but applies to all services using the rule collectively.
ResourceArn
Matches the ARN of the AWS resource on which the service runs.
public string ResourceArn { get; set; }
Property Value
System.
Remarks
RuleArn
The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
public string RuleArn { get; set; }
Property Value
System.
Remarks
Specifying a sampling rule by name is recommended, as specifying by ARN will be deprecated in future.
RuleName
The name of the sampling rule.
public string RuleName { get; set; }
Property Value
System.
Remarks
Specify a rule by either name or ARN, but not both.
ServiceName
Matches the name
that the service uses to identify itself in segments.
public string ServiceName { get; set; }
Property Value
System.
Remarks
ServiceType
Matches the origin
that the service uses to identify its type in segments.
public string ServiceType { get; set; }
Property Value
System.
Remarks
UrlPath
Matches the path from a request URL.
public string UrlPath { get; set; }
Property Value
System.
Remarks
Version
The version of the sampling rule.
public Nullable<double> Version { get; set; }
Property Value
System.
Remarks
Version
can only be set when creating a new sampling rule.