export method

  1. @override
void export(
  1. List<Span> spans
)
override

Implementation

@override
void export(List<api.Span> spans) {
  if (_isShutdown) {
    return;
  }

  if (spans.isEmpty) {
    return;
  }

  final body = pb_trace_service.ExportTraceServiceRequest(
      resourceSpans: _spansToProtobuf(spans));

  final headers = {
    'Content-Type': 'application/x-protobuf',
    if (jwtKey != null) 'Authorization': jwtKey!,
  };

  client.post(uri, body: body.writeToBuffer(), headers: headers);
}