CmdID

CmdID / aws / aws xray

aws xray get-sampling-targets

Requests a sampling quota for rules that the service is using to sample requests. AWS CLI reference

1 example 2 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To request a sampling quota

The following get-sampling-targets example requests a sampling quota for rules that the service is using to sample requests. The response from AWS X-Ray includes a quota that can be used instead of borrowing from the reservoir.

aws xray get-sampling-targets --sampling-statistics-documents '[ { "RuleName": "base-scorekeep", "ClientID": "ABCDEF1234567890ABCDEF10", "Timestamp": "2018-07-07T00:20:06", "RequestCount": 110, "SampledCount": 20, "BorrowCount": 10 }, { "RuleName": "polling-scorekeep", "ClientID": "ABCDEF1234567890ABCDEF10", "Timestamp": "2018-07-07T00:20:06", "RequestCount": 31, "SampledCount": 0, "BorrowCount": 0 } ]'Identify
--sampling-statistics-documentsInformation about rules that the service is using to sample requests.
Its output
{
    "SamplingTargetDocuments": [
        {
            "RuleName": "base-scorekeep",
            "FixedRate": 0.1,
            "ReservoirQuota": 2,
            "ReservoirQuotaTTL": 1530923107.0,
            "Interval": 10
        },
        {
            "RuleName": "polling-scorekeep",
            "FixedRate": 0.003,
            "ReservoirQuota": 0,
            "ReservoirQuotaTTL": 1530923107.0,
            "Interval": 10
        }
    ],
    "LastRuleModification": 1530920505.0,
    "UnprocessedStatistics": []
}

For more information, see Using Sampling Rules with the X-Ray API in the AWS X-Ray Developer Guide.

Options

2 in the AWS CLI reference
--sampling-boost-statistics-documentsInformation about rules that the service is using to boost sampling rate.
--sampling-statistics-documentsInformation about rules that the service is using to sample requests.