XRay / Client / start_trace_retrieval
start_trace_retrieval#
- XRay.Client.start_trace_retrieval(**kwargs)#
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 Transaction Search.
API returns a
RetrievalToken
, which can be used withListRetrievedTraces
orGetRetrievedTracesGraph
to fetch results. Retrievals will time out after 60 minutes. To execute long time ranges, consider segmenting into multiple retrievals.If you are using CloudWatch cross-account observability, 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.
For retrieving data from X-Ray directly as opposed to the Transaction-Search Log group, see BatchGetTraces.
See also: AWS API Documentation
Request Syntax
response = client.start_trace_retrieval( TraceIds=[ 'string', ], StartTime=datetime(2015, 1, 1), EndTime=datetime(2015, 1, 1) )
- Parameters:
TraceIds (list) –
[REQUIRED]
Specify the trace IDs of the traces to be retrieved.
(string) –
StartTime (datetime) –
[REQUIRED]
The start of the time range to retrieve traces. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
EndTime (datetime) –
[REQUIRED]
The end of the time range to retrieve traces. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
- Return type:
dict
- Returns:
Response Syntax
{ 'RetrievalToken': 'string' }
Response Structure
(dict) –
RetrievalToken (string) –
Retrieval token.
Exceptions
XRay.Client.exceptions.InvalidRequestException
XRay.Client.exceptions.ThrottledException
XRay.Client.exceptions.ResourceNotFoundException