Skip to content

SamplingRule

Source code in docs_src/capo_xray/types/sampling_rule.py
class SamplingRule(TypedDict, closed=True):
    rule_name: NotRequired["capo_xray.types.rule_name.RuleName"]
    """<p>The name of the sampling rule. Specify a rule by either name or ARN, but not both.</p>"""
    rule_arn: NotRequired["capo_xray.types.string.String"]
    """<p>The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.</p>"""
    resource_arn: "capo_xray.types.resource_arn.ResourceARN"
    """<p>Matches the ARN of the Amazon Web Services resource on which the service runs.</p>"""
    priority: "capo_xray.types.priority.Priority"
    """<p>The priority of the sampling rule.</p>"""
    fixed_rate: "capo_xray.types.fixed_rate.FixedRate"
    """<p>The percentage of matching requests to instrument, after the reservoir is exhausted.</p>"""
    reservoir_size: "capo_xray.types.reservoir_size.ReservoirSize"
    """<p>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.</p>"""
    service_name: "capo_xray.types.service_name.ServiceName"
    """<p>Matches the <code>name</code> that the service uses to identify itself in segments.</p>"""
    service_type: "capo_xray.types.service_type.ServiceType"
    """<p>Matches the <code>origin</code> that the service uses to identify its type in segments.</p>"""
    host: "capo_xray.types.host.Host"
    """<p>Matches the hostname from a request URL.</p>"""
    http_method: "capo_xray.types.http_method.HTTPMethod"
    """<p>Matches the HTTP method of a request.</p>"""
    url_path: "capo_xray.types.url_path.URLPath"
    """<p>Matches the path from a request URL.</p>"""
    version: "capo_xray.types.version.Version"
    """<p>The version of the sampling rule format (<code>1</code>).</p>"""
    attributes: NotRequired["capo_xray.types.attribute_map.AttributeMap"]
    """<p>Matches attributes derived from the request.</p>"""
    sampling_rate_boost: NotRequired[
        "capo_xray.types.sampling_rate_boost.SamplingRateBoost"
    ]
    """<p>Specifies the multiplier applied to the base sampling rate. This boost allows you to temporarily increase sampling without changing the rule's configuration.</p>"""

attributes instance-attribute

attributes: NotRequired[AttributeMap]

Matches attributes derived from the request.

fixed_rate instance-attribute

fixed_rate: FixedRate

The percentage of matching requests to instrument, after the reservoir is exhausted.

host instance-attribute

host: Host

Matches the hostname from a request URL.

http_method instance-attribute

http_method: HTTPMethod

Matches the HTTP method of a request.

priority instance-attribute

priority: Priority

The priority of the sampling rule.

reservoir_size instance-attribute

reservoir_size: 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.

resource_arn instance-attribute

resource_arn: ResourceARN

Matches the ARN of the Amazon Web Services resource on which the service runs.

rule_arn instance-attribute

rule_arn: NotRequired[String]

The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

rule_name instance-attribute

rule_name: NotRequired[RuleName]

The name of the sampling rule. Specify a rule by either name or ARN, but not both.

sampling_rate_boost instance-attribute

sampling_rate_boost: NotRequired[SamplingRateBoost]

Specifies the multiplier applied to the base sampling rate. This boost allows you to temporarily increase sampling without changing the rule's configuration.

service_name instance-attribute

service_name: ServiceName

Matches the name that the service uses to identify itself in segments.

service_type instance-attribute

service_type: ServiceType

Matches the origin that the service uses to identify its type in segments.

url_path instance-attribute

url_path: URLPath

Matches the path from a request URL.

version instance-attribute

version: Version

The version of the sampling rule format (1).