Close the sink and ensure all pending trace data is flushed to the target.
@override Future<void> close() async { _sink.write('\n]\n'); await _sink.flush(); await _sink.close(); }