Skip to content

batch_get_traces async

batch_get_traces(
    trace_ids: TraceIdList,
    *,
    config_overrides: Optional[AsyncXRayClientConfig] = None,
    next_token: Optional[String] = None,
) -> BatchGetTracesResult

You cannot find traces through this API if Transaction Search is enabled since trace is not indexed in X-Ray.

Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from a single request. Use GetTraceSummaries to get a list of trace IDs.

Parameters:

  • trace_ids (TraceIdList) –

    Specify the trace IDs of requests for which to retrieve segments.

  • next_token (Optional[String], default: None ) –

    Pagination token.

Raises:

Source code in docs_src/capo_xray/_services/async_x_ray.py
async def batch_get_traces(
    self,
    trace_ids: "capo_xray.types.trace_id_list.TraceIdList",
    *,
    config_overrides: Optional[AsyncXRayClientConfig] = None,
    next_token: Optional["capo_xray.types.string.String"] = None,
) -> "capo_xray.types.batch_get_traces_result.BatchGetTracesResult":
    """<note> <p>You cannot find traces through this API if Transaction Search is enabled since trace is not indexed in X-Ray.</p> </note> <p>Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from a single request. Use <code>GetTraceSummaries</code> to get a list of trace IDs.</p>

    Args:
        trace_ids: <p>Specify the trace IDs of requests for which to retrieve segments.</p>
        next_token: <p>Pagination token.</p>

    Raises:
        capo_xray.errors.invalid_request_exception.InvalidRequestException: <p>The request is missing required parameters or has invalid parameters.</p>
        capo_xray.errors.throttled_exception.ThrottledException: <p>The request exceeds the maximum number of requests per second.</p>
        capo_xray.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_xray.types.batch_get_traces_request.BatchGetTracesRequest]",
    ) -> AsyncOperationResponse[
        "capo_xray.types.batch_get_traces_result.BatchGetTracesResult"
    ]:
        import capo_xray._operations.awsx_ray.batch_get_traces

        (
            output,
            http_response,
        ) = await capo_xray._operations.awsx_ray.batch_get_traces.async_batch_get_traces(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetTraces")
    )
    input_: capo_xray.types.batch_get_traces_request.BatchGetTracesRequest = {
        "trace_ids": trace_ids
    }
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output