get_trace_summaries
¶
get_trace_summaries(
start_time: Timestamp,
end_time: Timestamp,
*,
config_overrides: Optional[XRayClientConfig] = None,
time_range_type: Optional[TimeRangeType] = None,
sampling: Optional[NullableBoolean] = None,
sampling_strategy: Optional[SamplingStrategy] = None,
filter_expression: Optional[FilterExpression] = None,
next_token: Optional[String] = None,
) -> GetTraceSummariesResult
Retrieves IDs and annotations for traces available for a specified time frame using an optional filter. To get the full traces, pass the trace IDs to BatchGetTraces.
A filter expression can target traced requests that hit specific service nodes or edges, have errors, or come from a known user. For example, the following filter expression targets traces that pass through api.example.com:
service("api.example.com")
This filter expression finds traces that have an annotation named account with the value 12345:
annotation.account = "12345"
For a full list of indexed fields and keywords that you can use in filter expressions, see Use filter expressions in the Amazon Web Services X-Ray Developer Guide.
Parameters:
-
start_time(Timestamp) –The start of the time frame for which to retrieve traces.
-
end_time(Timestamp) –The end of the time frame for which to retrieve traces.
-
time_range_type(Optional[TimeRangeType], default:None) –Query trace summaries by TraceId (trace start time), Event (trace update time), or Service (trace segment end time).
-
sampling(Optional[NullableBoolean], default:None) –Set to
trueto get summaries for only a subset of available traces. -
sampling_strategy(Optional[SamplingStrategy], default:None) –A parameter to indicate whether to enable sampling on trace summaries. Input parameters are Name and Value.
-
filter_expression(Optional[FilterExpression], default:None) –Specify a filter expression to retrieve trace summaries for services or requests that meet certain requirements.
-
next_token(Optional[String], default:None) –Specify the pagination token returned by a previous request to retrieve the next page of results.
Raises:
-
InvalidRequestException–The request is missing required parameters or has invalid parameters.
-
ThrottledException–The request exceeds the maximum number of requests per second.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_xray/_services/x_ray.py
1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 | |