flush method
Waits for any in flight telemetry submission, as well as flushing next.
Implementation
@override
Future<void> flush() {
final next = this.next;
return Future.wait([
..._outstandingFutures,
if (next != null) next.flush(),
]);
}