2020/11/04 - AWS X-Ray - 4 new1 updated api methods
Changes Update xray client to latest version
Retrieves the summary information of an insight. This includes impact to clients and root cause services, the top anomalous services, the category, the state of the insight, and the start and end time of the insight.
See also: AWS API Documentation
Request Syntax
client.get_insight( InsightId='string' )
string
[REQUIRED]
The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
dict
Response Syntax
{ 'Insight': { 'InsightId': 'string', 'GroupARN': 'string', 'GroupName': 'string', 'RootCauseServiceId': { 'Name': 'string', 'Names': [ 'string', ], 'AccountId': 'string', 'Type': 'string' }, 'Categories': [ 'FAULT', ], 'State': 'ACTIVE'|'CLOSED', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Summary': 'string', 'ClientRequestImpactStatistics': { 'FaultCount': 123, 'OkCount': 123, 'TotalCount': 123 }, 'RootCauseServiceRequestImpactStatistics': { 'FaultCount': 123, 'OkCount': 123, 'TotalCount': 123 }, 'TopAnomalousServices': [ { 'ServiceId': { 'Name': 'string', 'Names': [ 'string', ], 'AccountId': 'string', 'Type': 'string' } }, ] } }
Response Structure
(dict) --
Insight (dict) --
The summary information of an insight.
InsightId (string) --
The insights unique identifier.
GroupARN (string) --
The Amazon Resource Name (ARN) of the group that the insight belongs to.
GroupName (string) --
The name of the group that the insight belongs to.
RootCauseServiceId (dict) --
Name (string) --
Names (list) --
(string) --
AccountId (string) --
Type (string) --
Categories (list) --
The categories that label and describe the type of insight.
(string) --
State (string) --
The current state of the insight.
StartTime (datetime) --
The time, in Unix seconds, at which the insight began.
EndTime (datetime) --
The time, in Unix seconds, at which the insight ended.
Summary (string) --
A brief description of the insight.
ClientRequestImpactStatistics (dict) --
The impact statistics of the client side service. This includes the number of requests to the client service and whether the requests were faults or okay.
FaultCount (integer) --
The number of requests that have resulted in a fault,
OkCount (integer) --
The number of successful requests.
TotalCount (integer) --
The total number of requests to the service.
RootCauseServiceRequestImpactStatistics (dict) --
The impact statistics of the root cause service. This includes the number of requests to the client service and whether the requests were faults or okay.
FaultCount (integer) --
The number of requests that have resulted in a fault,
OkCount (integer) --
The number of successful requests.
TotalCount (integer) --
The total number of requests to the service.
TopAnomalousServices (list) --
The service within the insight that is most impacted by the incident.
(dict) --
The service within the service graph that has anomalously high fault rates.
ServiceId (dict) --
Name (string) --
Names (list) --
(string) --
AccountId (string) --
Type (string) --
Retrieves the summaries of all insights in the specified group matching the provided filter values.
See also: AWS API Documentation
Request Syntax
client.get_insight_summaries( States=[ 'ACTIVE'|'CLOSED', ], GroupARN='string', GroupName='string', StartTime=datetime(2015, 1, 1), EndTime=datetime(2015, 1, 1), MaxResults=123, NextToken='string' )
list
The list of insight states.
(string) --
string
The Amazon Resource Name (ARN) of the group. Required if the GroupName isn't provided.
string
The name of the group. Required if the GroupARN isn't provided.
datetime
[REQUIRED]
The beginning of the time frame in which the insights started. The start time can't be more than 30 days old.
datetime
[REQUIRED]
The end of the time frame in which the insights ended. The end time can't be more than 30 days old.
integer
The maximum number of results to display.
string
Pagination token.
dict
Response Syntax
{ 'InsightSummaries': [ { 'InsightId': 'string', 'GroupARN': 'string', 'GroupName': 'string', 'RootCauseServiceId': { 'Name': 'string', 'Names': [ 'string', ], 'AccountId': 'string', 'Type': 'string' }, 'Categories': [ 'FAULT', ], 'State': 'ACTIVE'|'CLOSED', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Summary': 'string', 'ClientRequestImpactStatistics': { 'FaultCount': 123, 'OkCount': 123, 'TotalCount': 123 }, 'RootCauseServiceRequestImpactStatistics': { 'FaultCount': 123, 'OkCount': 123, 'TotalCount': 123 }, 'TopAnomalousServices': [ { 'ServiceId': { 'Name': 'string', 'Names': [ 'string', ], 'AccountId': 'string', 'Type': 'string' } }, ], 'LastUpdateTime': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
InsightSummaries (list) --
The summary of each insight within the group matching the provided filters. The summary contains the InsightID, start and end time, the root cause service, the root cause and client impact statistics, the top anomalous services, and the status of the insight.
(dict) --
Information that describes an insight.
InsightId (string) --
The insights unique identifier.
GroupARN (string) --
The Amazon Resource Name (ARN) of the group that the insight belongs to.
GroupName (string) --
The name of the group that the insight belongs to.
RootCauseServiceId (dict) --
Name (string) --
Names (list) --
(string) --
AccountId (string) --
Type (string) --
Categories (list) --
Categories The categories that label and describe the type of insight.
(string) --
State (string) --
The current state of the insight.
StartTime (datetime) --
The time, in Unix seconds, at which the insight began.
EndTime (datetime) --
The time, in Unix seconds, at which the insight ended.
Summary (string) --
A brief description of the insight.
ClientRequestImpactStatistics (dict) --
The impact statistics of the client side service. This includes the number of requests to the client service and whether the requests were faults or okay.
FaultCount (integer) --
The number of requests that have resulted in a fault,
OkCount (integer) --
The number of successful requests.
TotalCount (integer) --
The total number of requests to the service.
RootCauseServiceRequestImpactStatistics (dict) --
The impact statistics of the root cause service. This includes the number of requests to the client service and whether the requests were faults or okay.
FaultCount (integer) --
The number of requests that have resulted in a fault,
OkCount (integer) --
The number of successful requests.
TotalCount (integer) --
The total number of requests to the service.
TopAnomalousServices (list) --
The service within the insight that is most impacted by the incident.
(dict) --
The service within the service graph that has anomalously high fault rates.
ServiceId (dict) --
Name (string) --
Names (list) --
(string) --
AccountId (string) --
Type (string) --
LastUpdateTime (datetime) --
The time, in Unix seconds, that the insight was last updated.
NextToken (string) --
Pagination token.
Retrieves a service graph structure filtered by the specified insight. The service graph is limited to only structural information. For a complete service graph, use this API with the GetServiceGraph API.
See also: AWS API Documentation
Request Syntax
client.get_insight_impact_graph( InsightId='string', StartTime=datetime(2015, 1, 1), EndTime=datetime(2015, 1, 1), NextToken='string' )
string
[REQUIRED]
The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
datetime
[REQUIRED]
The estimated start time of the insight, in Unix time seconds. The StartTime is inclusive of the value provided and can't be more than 30 days old.
datetime
[REQUIRED]
The estimated end time of the insight, in Unix time seconds. The EndTime is exclusive of the value provided. The time range between the start time and end time can't be more than six hours.
string
Specify the pagination token returned by a previous request to retrieve the next page of results.
dict
Response Syntax
{ 'InsightId': 'string', 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'ServiceGraphStartTime': datetime(2015, 1, 1), 'ServiceGraphEndTime': datetime(2015, 1, 1), 'Services': [ { 'ReferenceId': 123, 'Type': 'string', 'Name': 'string', 'Names': [ 'string', ], 'AccountId': 'string', 'Edges': [ { 'ReferenceId': 123 }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
InsightId (string) --
The insight's unique identifier.
StartTime (datetime) --
The provided start time.
EndTime (datetime) --
The provided end time.
ServiceGraphStartTime (datetime) --
The time, in Unix seconds, at which the service graph started.
ServiceGraphEndTime (datetime) --
The time, in Unix seconds, at which the service graph ended.
Services (list) --
The AWS instrumented services related to the insight.
(dict) --
Information about an application that processed requests, users that made requests, or downstream services, resources, and applications that an application used.
ReferenceId (integer) --
Identifier for the service. Unique within the service map.
Type (string) --
Identifier for the service. Unique within the service map.
AWS Resource - The type of an AWS resource. For example, AWS::EC2::Instance for an application running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used.
AWS Service - The type of an AWS service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
AWS Service - The type of an AWS service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
remote - A downstream service of indeterminate type.
Name (string) --
The canonical name of the service.
Names (list) --
A list of names for the service, including the canonical name.
(string) --
AccountId (string) --
Identifier of the AWS account in which the service runs.
Edges (list) --
Connections to downstream services.
(dict) --
The connection between two service in an insight impact graph.
ReferenceId (integer) --
Identifier of the edge. Unique within a service map.
NextToken (string) --
Pagination token.
X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event. You can review an insight's events in the Impact Timeline on the Inspect page in the X-Ray console.
See also: AWS API Documentation
Request Syntax
client.get_insight_events( InsightId='string', MaxResults=123, NextToken='string' )
string
[REQUIRED]
The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.
integer
Used to retrieve at most the specified value of events.
string
Specify the pagination token returned by a previous request to retrieve the next page of events.
dict
Response Syntax
{ 'InsightEvents': [ { 'Summary': 'string', 'EventTime': datetime(2015, 1, 1), 'ClientRequestImpactStatistics': { 'FaultCount': 123, 'OkCount': 123, 'TotalCount': 123 }, 'RootCauseServiceRequestImpactStatistics': { 'FaultCount': 123, 'OkCount': 123, 'TotalCount': 123 }, 'TopAnomalousServices': [ { 'ServiceId': { 'Name': 'string', 'Names': [ 'string', ], 'AccountId': 'string', 'Type': 'string' } }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
InsightEvents (list) --
A detailed description of the event. This includes the time of the event, client and root cause impact statistics, and the top anomalous service at the time of the event.
(dict) --
X-Ray reevaluates insights periodically until they are resolved, and records each intermediate state in an event. You can review incident events in the Impact Timeline on the Inspect page in the X-Ray console.
Summary (string) --
A brief description of the event.
EventTime (datetime) --
The time, in Unix seconds, at which the event was recorded.
ClientRequestImpactStatistics (dict) --
The impact statistics of the client side service. This includes the number of requests to the client service and whether the requests were faults or okay.
FaultCount (integer) --
The number of requests that have resulted in a fault,
OkCount (integer) --
The number of successful requests.
TotalCount (integer) --
The total number of requests to the service.
RootCauseServiceRequestImpactStatistics (dict) --
The impact statistics of the root cause service. This includes the number of requests to the client service and whether the requests were faults or okay.
FaultCount (integer) --
The number of requests that have resulted in a fault,
OkCount (integer) --
The number of successful requests.
TotalCount (integer) --
The total number of requests to the service.
TopAnomalousServices (list) --
The service during the event that is most impacted by the incident.
(dict) --
The service within the service graph that has anomalously high fault rates.
ServiceId (dict) --
Name (string) --
Names (list) --
(string) --
AccountId (string) --
Type (string) --
NextToken (string) --
Use this token to retrieve the next page of insight events.
{'ForecastStatistics': 'boolean'}Response
{'TimeSeriesServiceStatistics': {'ServiceForecastStatistics': {'FaultCountHigh': 'long', 'FaultCountLow': 'long'}}}
Get an aggregation of service statistics defined by a specific time range.
See also: AWS API Documentation
Request Syntax
client.get_time_series_service_statistics( StartTime=datetime(2015, 1, 1), EndTime=datetime(2015, 1, 1), GroupName='string', GroupARN='string', EntitySelectorExpression='string', Period=123, ForecastStatistics=True|False, NextToken='string' )
datetime
[REQUIRED]
The start of the time frame for which to aggregate statistics.
datetime
[REQUIRED]
The end of the time frame for which to aggregate statistics.
string
The case-sensitive name of the group for which to pull statistics from.
string
The Amazon Resource Name (ARN) of the group for which to pull statistics from.
string
A filter expression defining entities that will be aggregated for statistics. Supports ID, service, and edge functions. If no selector expression is specified, edge statistics are returned.
integer
Aggregation period in seconds.
boolean
The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.
string
Pagination token.
dict
Response Syntax
{ 'TimeSeriesServiceStatistics': [ { 'Timestamp': datetime(2015, 1, 1), 'EdgeSummaryStatistics': { 'OkCount': 123, 'ErrorStatistics': { 'ThrottleCount': 123, 'OtherCount': 123, 'TotalCount': 123 }, 'FaultStatistics': { 'OtherCount': 123, 'TotalCount': 123 }, 'TotalCount': 123, 'TotalResponseTime': 123.0 }, 'ServiceSummaryStatistics': { 'OkCount': 123, 'ErrorStatistics': { 'ThrottleCount': 123, 'OtherCount': 123, 'TotalCount': 123 }, 'FaultStatistics': { 'OtherCount': 123, 'TotalCount': 123 }, 'TotalCount': 123, 'TotalResponseTime': 123.0 }, 'ServiceForecastStatistics': { 'FaultCountHigh': 123, 'FaultCountLow': 123 }, 'ResponseTimeHistogram': [ { 'Value': 123.0, 'Count': 123 }, ] }, ], 'ContainsOldGroupVersions': True|False, 'NextToken': 'string' }
Response Structure
(dict) --
TimeSeriesServiceStatistics (list) --
The collection of statistics.
(dict) --
A list of TimeSeriesStatistic structures.
Timestamp (datetime) --
Timestamp of the window for which statistics are aggregated.
EdgeSummaryStatistics (dict) --
Response statistics for an edge.
OkCount (integer) --
The number of requests that completed with a 2xx Success status code.
ErrorStatistics (dict) --
Information about requests that failed with a 4xx Client Error status code.
ThrottleCount (integer) --
The number of requests that failed with a 419 throttling status code.
OtherCount (integer) --
The number of requests that failed with untracked 4xx Client Error status codes.
TotalCount (integer) --
The total number of requests that failed with a 4xx Client Error status code.
FaultStatistics (dict) --
Information about requests that failed with a 5xx Server Error status code.
OtherCount (integer) --
The number of requests that failed with untracked 5xx Server Error status codes.
TotalCount (integer) --
The total number of requests that failed with a 5xx Server Error status code.
TotalCount (integer) --
The total number of completed requests.
TotalResponseTime (float) --
The aggregate response time of completed requests.
ServiceSummaryStatistics (dict) --
Response statistics for a service.
OkCount (integer) --
The number of requests that completed with a 2xx Success status code.
ErrorStatistics (dict) --
Information about requests that failed with a 4xx Client Error status code.
ThrottleCount (integer) --
The number of requests that failed with a 419 throttling status code.
OtherCount (integer) --
The number of requests that failed with untracked 4xx Client Error status codes.
TotalCount (integer) --
The total number of requests that failed with a 4xx Client Error status code.
FaultStatistics (dict) --
Information about requests that failed with a 5xx Server Error status code.
OtherCount (integer) --
The number of requests that failed with untracked 5xx Server Error status codes.
TotalCount (integer) --
The total number of requests that failed with a 5xx Server Error status code.
TotalCount (integer) --
The total number of completed requests.
TotalResponseTime (float) --
The aggregate response time of completed requests.
ServiceForecastStatistics (dict) --
The forecasted high and low fault count values.
FaultCountHigh (integer) --
The upper limit of fault counts for a service.
FaultCountLow (integer) --
The lower limit of fault counts for a service.
ResponseTimeHistogram (list) --
The response time histogram for the selected entities.
(dict) --
An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.
Value (float) --
The value of the entry.
Count (integer) --
The prevalence of the entry.
ContainsOldGroupVersions (boolean) --
A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.
NextToken (string) --
Pagination token.