batchGetTraces method

Future<BatchGetTracesResult> batchGetTraces({
  1. required List<String> traceIds,
  2. String? nextToken,
})

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.

May throw InvalidRequestException. May throw ThrottledException.

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

Parameter nextToken : Pagination token.

Implementation

Future<BatchGetTracesResult> batchGetTraces({
  required List<String> traceIds,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(traceIds, 'traceIds');
  final $payload = <String, dynamic>{
    'TraceIds': traceIds,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/Traces',
    exceptionFnMap: _exceptionFns,
  );
  return BatchGetTracesResult.fromJson(response);
}