- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetInsightEventsCommand
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.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { XRayClient, GetInsightEventsCommand } from "@aws-sdk/client-xray"; // ES Modules import
// const { XRayClient, GetInsightEventsCommand } = require("@aws-sdk/client-xray"); // CommonJS import
const client = new XRayClient(config);
const input = { // GetInsightEventsRequest
InsightId: "STRING_VALUE", // required
MaxResults: Number("int"),
NextToken: "STRING_VALUE",
};
const command = new GetInsightEventsCommand(input);
const response = await client.send(command);
// { // GetInsightEventsResult
// InsightEvents: [ // InsightEventList
// { // InsightEvent
// Summary: "STRING_VALUE",
// EventTime: new Date("TIMESTAMP"),
// ClientRequestImpactStatistics: { // RequestImpactStatistics
// FaultCount: Number("long"),
// OkCount: Number("long"),
// TotalCount: Number("long"),
// },
// RootCauseServiceRequestImpactStatistics: {
// FaultCount: Number("long"),
// OkCount: Number("long"),
// TotalCount: Number("long"),
// },
// TopAnomalousServices: [ // AnomalousServiceList
// { // AnomalousService
// ServiceId: { // ServiceId
// Name: "STRING_VALUE",
// Names: [ // ServiceNames
// "STRING_VALUE",
// ],
// AccountId: "STRING_VALUE",
// Type: "STRING_VALUE",
// },
// },
// ],
// },
// ],
// NextToken: "STRING_VALUE",
// };
GetInsightEventsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
InsightId Required | string | undefined | The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId. |
MaxResults | number | undefined | Used to retrieve at most the specified value of events. |
NextToken | string | undefined | Specify the pagination token returned by a previous request to retrieve the next page of events. |
GetInsightEventsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
InsightEvents | InsightEvent[] | undefined | 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. |
NextToken | string | undefined | Use this token to retrieve the next page of insight events. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InvalidRequestException | client | The request is missing required parameters or has invalid parameters. |
ThrottledException | client | The request exceeds the maximum number of requests per second. |
XRayServiceException | Base exception class for all service exceptions from XRay service. |