Skip to content

Commit 36606c9

Browse files
AWS X-Ray Features: Support Sampling Rate Boost On Anomaly
1 parent bf9ccb2 commit 36606c9

31 files changed

+1200
-83
lines changed

generator/ServiceModels/xray/xray-2016-04-12.api.json

Lines changed: 77 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,10 @@
568568
"type":"list",
569569
"member":{"shape":"AnomalousService"}
570570
},
571+
"AnomalyCount":{
572+
"type":"integer",
573+
"min":0
574+
},
571575
"AttributeKey":{
572576
"type":"string",
573577
"max":32,
@@ -638,6 +642,10 @@
638642
"max":24,
639643
"min":24
640644
},
645+
"CooldownWindowMinutes":{
646+
"type":"integer",
647+
"min":0
648+
},
641649
"CreateGroupRequest":{
642650
"type":"structure",
643651
"required":["GroupName"],
@@ -1062,15 +1070,17 @@
10621070
"type":"structure",
10631071
"required":["SamplingStatisticsDocuments"],
10641072
"members":{
1065-
"SamplingStatisticsDocuments":{"shape":"SamplingStatisticsDocumentList"}
1073+
"SamplingStatisticsDocuments":{"shape":"SamplingStatisticsDocumentList"},
1074+
"SamplingBoostStatisticsDocuments":{"shape":"SamplingBoostStatisticsDocumentList"}
10661075
}
10671076
},
10681077
"GetSamplingTargetsResult":{
10691078
"type":"structure",
10701079
"members":{
10711080
"SamplingTargetDocuments":{"shape":"SamplingTargetDocumentList"},
10721081
"LastRuleModification":{"shape":"Timestamp"},
1073-
"UnprocessedStatistics":{"shape":"UnprocessedStatisticsList"}
1082+
"UnprocessedStatistics":{"shape":"UnprocessedStatisticsList"},
1083+
"UnprocessedBoostStatistics":{"shape":"UnprocessedStatisticsList"}
10741084
}
10751085
},
10761086
"GetServiceGraphRequest":{
@@ -1475,6 +1485,11 @@
14751485
"error":{"httpStatusCode":400},
14761486
"exception":true
14771487
},
1488+
"MaxRate":{
1489+
"type":"double",
1490+
"max":1,
1491+
"min":0
1492+
},
14781493
"NullableBoolean":{"type":"boolean"},
14791494
"NullableDouble":{"type":"double"},
14801495
"NullableInteger":{"type":"integer"},
@@ -1734,10 +1749,60 @@
17341749
"max":32,
17351750
"min":1
17361751
},
1752+
"SampledAnomalyCount":{
1753+
"type":"integer",
1754+
"min":0
1755+
},
17371756
"SampledCount":{
17381757
"type":"integer",
17391758
"min":0
17401759
},
1760+
"SamplingBoost":{
1761+
"type":"structure",
1762+
"required":[
1763+
"BoostRate",
1764+
"BoostRateTTL"
1765+
],
1766+
"members":{
1767+
"BoostRate":{"shape":"Double"},
1768+
"BoostRateTTL":{"shape":"Timestamp"}
1769+
}
1770+
},
1771+
"SamplingBoostStatisticsDocument":{
1772+
"type":"structure",
1773+
"required":[
1774+
"RuleName",
1775+
"ServiceName",
1776+
"Timestamp",
1777+
"AnomalyCount",
1778+
"TotalCount",
1779+
"SampledAnomalyCount"
1780+
],
1781+
"members":{
1782+
"RuleName":{"shape":"RuleName"},
1783+
"ServiceName":{"shape":"ServiceName"},
1784+
"Timestamp":{"shape":"Timestamp"},
1785+
"AnomalyCount":{"shape":"AnomalyCount"},
1786+
"TotalCount":{"shape":"TotalCount"},
1787+
"SampledAnomalyCount":{"shape":"SampledAnomalyCount"}
1788+
}
1789+
},
1790+
"SamplingBoostStatisticsDocumentList":{
1791+
"type":"list",
1792+
"member":{"shape":"SamplingBoostStatisticsDocument"},
1793+
"max":25
1794+
},
1795+
"SamplingRateBoost":{
1796+
"type":"structure",
1797+
"required":[
1798+
"MaxRate",
1799+
"CooldownWindowMinutes"
1800+
],
1801+
"members":{
1802+
"MaxRate":{"shape":"MaxRate"},
1803+
"CooldownWindowMinutes":{"shape":"CooldownWindowMinutes"}
1804+
}
1805+
},
17411806
"SamplingRule":{
17421807
"type":"structure",
17431808
"required":[
@@ -1765,7 +1830,8 @@
17651830
"HTTPMethod":{"shape":"HTTPMethod"},
17661831
"URLPath":{"shape":"URLPath"},
17671832
"Version":{"shape":"Version"},
1768-
"Attributes":{"shape":"AttributeMap"}
1833+
"Attributes":{"shape":"AttributeMap"},
1834+
"SamplingRateBoost":{"shape":"SamplingRateBoost"}
17691835
}
17701836
},
17711837
"SamplingRuleRecord":{
@@ -1794,7 +1860,8 @@
17941860
"ServiceType":{"shape":"ServiceType"},
17951861
"HTTPMethod":{"shape":"HTTPMethod"},
17961862
"URLPath":{"shape":"URLPath"},
1797-
"Attributes":{"shape":"AttributeMap"}
1863+
"Attributes":{"shape":"AttributeMap"},
1864+
"SamplingRateBoost":{"shape":"SamplingRateBoost"}
17981865
}
17991866
},
18001867
"SamplingStatisticSummary":{
@@ -1855,7 +1922,8 @@
18551922
"FixedRate":{"shape":"Double"},
18561923
"ReservoirQuota":{"shape":"NullableInteger"},
18571924
"ReservoirQuotaTTL":{"shape":"Timestamp"},
1858-
"Interval":{"shape":"NullableInteger"}
1925+
"Interval":{"shape":"NullableInteger"},
1926+
"SamplingBoost":{"shape":"SamplingBoost"}
18591927
}
18601928
},
18611929
"SamplingTargetDocumentList":{
@@ -2086,6 +2154,10 @@
20862154
"error":{"httpStatusCode":400},
20872155
"exception":true
20882156
},
2157+
"TotalCount":{
2158+
"type":"integer",
2159+
"min":0
2160+
},
20892161
"Trace":{
20902162
"type":"structure",
20912163
"members":{

generator/ServiceModels/xray/xray-2016-04-12.docs.json

Lines changed: 67 additions & 6 deletions
Large diffs are not rendered by default.

generator/ServiceModels/xray/xray-2016-04-12.normal.json

Lines changed: 125 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
{"shape":"InvalidRequestException"},
337337
{"shape":"ThrottledException"}
338338
],
339-
"documentation":"<p> Retrieves the current destination of data sent to <code>PutTraceSegments</code> and <i>OpenTelemetry</i> API. The Transaction Search feature requires a CloudWatchLogs destination. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html\">Transaction Search</a> and <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OpenTelemetry-Sections.html\">OpenTelemetry</a>. </p>"
339+
"documentation":"<p> Retrieves the current destination of data sent to <code>PutTraceSegments</code> and <i>OpenTelemetry protocol (OTLP)</i> endpoint. The Transaction Search feature requires a CloudWatchLogs destination. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html\">Transaction Search</a> and <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OpenTelemetry-Sections.html\">OpenTelemetry</a>. </p>"
340340
},
341341
"GetTraceSummaries":{
342342
"name":"GetTraceSummaries",
@@ -379,7 +379,7 @@
379379
{"shape":"ThrottledException"},
380380
{"shape":"ResourceNotFoundException"}
381381
],
382-
"documentation":"<p> Retrieves a list of traces for a given <code>RetrievalToken</code> from the CloudWatch log group generated by Transaction Search. For information on what each trace returns, see <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_BatchGetTraces.html\">BatchGetTraces</a>. </p> <p>This API does not initiate a retrieval job. To start a trace retrieval, use <code>StartTraceRetrieval</code>, which generates the required <code>RetrievalToken</code>.</p> <p> When the <code>RetrievalStatus</code> is not <i>COMPLETE</i>, the API will return an empty response. Retry the request once the retrieval has completed to access the full list of traces.</p> <p>For cross-account observability, this API can retrieve traces from linked accounts when CloudWatch log is the destination across relevant accounts. For more details, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html\">CloudWatch cross-account observability</a>.</p> <p>For retrieving data from X-Ray directly as opposed to the Transaction-Search Log group, see <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_BatchGetTraces.html\">BatchGetTraces</a>.</p>"
382+
"documentation":"<p> Retrieves a list of traces for a given <code>RetrievalToken</code> from the CloudWatch log group generated by Transaction Search. For information on what each trace returns, see <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_BatchGetTraces.html\">BatchGetTraces</a>. </p> <p>This API does not initiate a retrieval process. To start a trace retrieval, use <code>StartTraceRetrieval</code>, which generates the required <code>RetrievalToken</code>.</p> <p> When the <code>RetrievalStatus</code> is not <i>COMPLETE</i>, the API will return an empty response. Retry the request once the retrieval has completed to access the full list of traces.</p> <p>For cross-account observability, this API can retrieve traces from linked accounts when CloudWatch log is set as the destination across relevant accounts. For more details, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html\">CloudWatch cross-account observability</a>.</p> <p>For retrieving data from X-Ray directly as opposed to the Transaction Search generated log group, see <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_BatchGetTraces.html\">BatchGetTraces</a>.</p>"
383383
},
384384
"ListTagsForResource":{
385385
"name":"ListTagsForResource",
@@ -469,7 +469,7 @@
469469
{"shape":"ThrottledException"},
470470
{"shape":"ResourceNotFoundException"}
471471
],
472-
"documentation":"<p> Initiates a trace retrieval process using the specified time range and for the give trace IDs on Transaction Search generated by the CloudWatch log group. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html\">Transaction Search</a>. </p> <p>API returns a <code>RetrievalToken</code>, which can be used with <code>ListRetrievedTraces</code> or <code>GetRetrievedTracesGraph</code> to fetch results. Retrievals will time out after 60 minutes. To execute long time ranges, consider segmenting into multiple retrievals.</p> <p>If you are using <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html\">CloudWatch cross-account observability</a>, you can use this operation in a monitoring account to retrieve data from a linked source account, as long as both accounts have transaction search enabled.</p> <p>For retrieving data from X-Ray directly as opposed to the Transaction-Search Log group, see <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_BatchGetTraces.html\">BatchGetTraces</a>.</p>"
472+
"documentation":"<p> Initiates a trace retrieval process using the specified time range and for the given trace IDs in the Transaction Search generated CloudWatch log group. For more information, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html\">Transaction Search</a>. </p> <p>API returns a <code>RetrievalToken</code>, which can be used with <code>ListRetrievedTraces</code> or <code>GetRetrievedTracesGraph</code> to fetch results. Retrievals will time out after 60 minutes. To execute long time ranges, consider segmenting into multiple retrievals.</p> <p>If you are using <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html\">CloudWatch cross-account observability</a>, you can use this operation in a monitoring account to retrieve data from a linked source account, as long as both accounts have transaction search enabled.</p> <p>For retrieving data from X-Ray directly as opposed to the Transaction-Search Log group, see <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_BatchGetTraces.html\">BatchGetTraces</a>.</p>"
473473
},
474474
"TagResource":{
475475
"name":"TagResource",
@@ -627,6 +627,10 @@
627627
"type":"list",
628628
"member":{"shape":"AnomalousService"}
629629
},
630+
"AnomalyCount":{
631+
"type":"integer",
632+
"min":0
633+
},
630634
"AttributeKey":{
631635
"type":"string",
632636
"max":32,
@@ -738,6 +742,10 @@
738742
"max":24,
739743
"min":24
740744
},
745+
"CooldownWindowMinutes":{
746+
"type":"integer",
747+
"min":0
748+
},
741749
"CreateGroupRequest":{
742750
"type":"structure",
743751
"required":["GroupName"],
@@ -1501,6 +1509,10 @@
15011509
"SamplingStatisticsDocuments":{
15021510
"shape":"SamplingStatisticsDocumentList",
15031511
"documentation":"<p>Information about rules that the service is using to sample requests.</p>"
1512+
},
1513+
"SamplingBoostStatisticsDocuments":{
1514+
"shape":"SamplingBoostStatisticsDocumentList",
1515+
"documentation":"<p>Information about rules that the service is using to boost sampling rate.</p>"
15041516
}
15051517
}
15061518
},
@@ -1518,6 +1530,10 @@
15181530
"UnprocessedStatistics":{
15191531
"shape":"UnprocessedStatisticsList",
15201532
"documentation":"<p>Information about <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html\">SamplingStatisticsDocument</a> that X-Ray could not process.</p>"
1533+
},
1534+
"UnprocessedBoostStatistics":{
1535+
"shape":"UnprocessedStatisticsList",
1536+
"documentation":"<p>Information about <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_SamplingBoostStatisticsDocument.html\">SamplingBoostStatisticsDocument</a> that X-Ray could not process.</p>"
15211537
}
15221538
}
15231539
},
@@ -2281,6 +2297,11 @@
22812297
"error":{"httpStatusCode":400},
22822298
"exception":true
22832299
},
2300+
"MaxRate":{
2301+
"type":"double",
2302+
"max":1,
2303+
"min":0
2304+
},
22842305
"NullableBoolean":{"type":"boolean"},
22852306
"NullableDouble":{"type":"double"},
22862307
"NullableInteger":{"type":"integer"},
@@ -2681,10 +2702,93 @@
26812702
"max":32,
26822703
"min":1
26832704
},
2705+
"SampledAnomalyCount":{
2706+
"type":"integer",
2707+
"min":0
2708+
},
26842709
"SampledCount":{
26852710
"type":"integer",
26862711
"min":0
26872712
},
2713+
"SamplingBoost":{
2714+
"type":"structure",
2715+
"required":[
2716+
"BoostRate",
2717+
"BoostRateTTL"
2718+
],
2719+
"members":{
2720+
"BoostRate":{
2721+
"shape":"Double",
2722+
"documentation":"<p>The calculated sampling boost rate for this service </p>"
2723+
},
2724+
"BoostRateTTL":{
2725+
"shape":"Timestamp",
2726+
"documentation":"<p>When the sampling boost expires.</p>"
2727+
}
2728+
},
2729+
"documentation":"<p>Temporary boost sampling rate. X-Ray calculates sampling boost for each service based on the recent sampling boost stats of all services that called <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html\">GetSamplingTargets</a>.</p>"
2730+
},
2731+
"SamplingBoostStatisticsDocument":{
2732+
"type":"structure",
2733+
"required":[
2734+
"RuleName",
2735+
"ServiceName",
2736+
"Timestamp",
2737+
"AnomalyCount",
2738+
"TotalCount",
2739+
"SampledAnomalyCount"
2740+
],
2741+
"members":{
2742+
"RuleName":{
2743+
"shape":"RuleName",
2744+
"documentation":"<p>The name of the sampling rule.</p>"
2745+
},
2746+
"ServiceName":{
2747+
"shape":"ServiceName",
2748+
"documentation":"<p>Matches the <code>name</code> that the service uses to identify itself in segments.</p>"
2749+
},
2750+
"Timestamp":{
2751+
"shape":"Timestamp",
2752+
"documentation":"<p>The current time.</p>"
2753+
},
2754+
"AnomalyCount":{
2755+
"shape":"AnomalyCount",
2756+
"documentation":"<p>The number of requests with anomaly.</p>"
2757+
},
2758+
"TotalCount":{
2759+
"shape":"TotalCount",
2760+
"documentation":"<p>The number of requests that associated to the rule.</p>"
2761+
},
2762+
"SampledAnomalyCount":{
2763+
"shape":"SampledAnomalyCount",
2764+
"documentation":"<p>The number of requests with anomaly recorded.</p>"
2765+
}
2766+
},
2767+
"documentation":"<p>Request anomaly stats for a single rule from a service. Results are for the last 10 seconds unless the service has been assigned a longer reporting interval after a previous call to <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html\">GetSamplingTargets</a>.</p>"
2768+
},
2769+
"SamplingBoostStatisticsDocumentList":{
2770+
"type":"list",
2771+
"member":{"shape":"SamplingBoostStatisticsDocument"},
2772+
"max":25
2773+
},
2774+
"SamplingRateBoost":{
2775+
"type":"structure",
2776+
"required":[
2777+
"MaxRate",
2778+
"CooldownWindowMinutes"
2779+
],
2780+
"members":{
2781+
"MaxRate":{
2782+
"shape":"MaxRate",
2783+
"documentation":"<p>Defines max temporary sampling rate to apply when a boost is triggered. Calculated boost rate by X-Ray will be less than or equal to this max rate.</p>"
2784+
},
2785+
"CooldownWindowMinutes":{
2786+
"shape":"CooldownWindowMinutes",
2787+
"documentation":"<p>Sets the time window (in minutes) in which only one sampling rate boost can be triggered. After a boost occurs, no further boosts are allowed until the next window.</p>"
2788+
}
2789+
},
2790+
"documentation":"<p>Enable temporary sampling rate increases when you detect anomalies to improve visibility.</p>"
2791+
},
26882792
"SamplingRule":{
26892793
"type":"structure",
26902794
"required":[
@@ -2751,6 +2855,10 @@
27512855
"Attributes":{
27522856
"shape":"AttributeMap",
27532857
"documentation":"<p>Matches attributes derived from the request.</p>"
2858+
},
2859+
"SamplingRateBoost":{
2860+
"shape":"SamplingRateBoost",
2861+
"documentation":"<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>"
27542862
}
27552863
},
27562864
"documentation":"<p>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.</p>"
@@ -2827,6 +2935,10 @@
28272935
"Attributes":{
28282936
"shape":"AttributeMap",
28292937
"documentation":"<p>Matches attributes derived from the request.</p>"
2938+
},
2939+
"SamplingRateBoost":{
2940+
"shape":"SamplingRateBoost",
2941+
"documentation":"<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>"
28302942
}
28312943
},
28322944
"documentation":"<p>A document specifying changes to a sampling rule's configuration.</p>"
@@ -2946,6 +3058,10 @@
29463058
"Interval":{
29473059
"shape":"NullableInteger",
29483060
"documentation":"<p>The number of seconds for the service to wait before getting sampling targets again.</p>"
3061+
},
3062+
"SamplingBoost":{
3063+
"shape":"SamplingBoost",
3064+
"documentation":"<p>The sampling boost that X-Ray allocated for this service.</p>"
29493065
}
29503066
},
29513067
"documentation":"<p>Temporary changes to a sampling rule configuration. To meet the global sampling target for a rule, X-Ray calculates a new reservoir for each service based on the recent sampling results of all services that called <a href=\"https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html\">GetSamplingTargets</a>.</p>"
@@ -3317,6 +3433,10 @@
33173433
"error":{"httpStatusCode":400},
33183434
"exception":true
33193435
},
3436+
"TotalCount":{
3437+
"type":"integer",
3438+
"min":0
3439+
},
33203440
"Trace":{
33213441
"type":"structure",
33223442
"members":{
@@ -3326,7 +3446,7 @@
33263446
},
33273447
"Duration":{
33283448
"shape":"NullableDouble",
3329-
"documentation":"<p>The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.</p>"
3449+
"documentation":"<p>The length of time in seconds between the start time of the earliest segment that started and the end time of the last segment that completed.</p>"
33303450
},
33313451
"LimitExceeded":{
33323452
"shape":"NullableBoolean",
@@ -3415,7 +3535,7 @@
34153535
},
34163536
"Duration":{
34173537
"shape":"NullableDouble",
3418-
"documentation":"<p>The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.</p>"
3538+
"documentation":"<p> The length of time in seconds between the start time of the earliest segment that started and the end time of the last segment that completed.</p>"
34193539
},
34203540
"ResponseTime":{
34213541
"shape":"NullableDouble",

0 commit comments

Comments
 (0)