flush() {
		if (this.queue.length == 0) return;

		const data = this.generateTracingData();
		this.queue.length = 0;

		fetch(`${this.opts.baseURL}/api/v2/spans`, {
			method: "post",
			body: JSON.stringify(data),
			headers: this.opts.headers
		})
			.then(res => {
				if (res.status >= 400) {
					this.logger.warn(
						`Unable to upload tracing spans to Zipkin. Status: ${res.status} ${res.statusText}`
					);
				} else {
					this.logger.debug(
						`Tracing spans (${data.length} spans) are uploaded to Zipkin. Status: ${res.statusText}`
					);
				}
			})
			.catch(err => {
				this.logger.warn(
					"Unable to upload tracing spans to Zipkin. Error:" + err.message,
					err
				);
			});
	}
Flush tracing data to Datadog server

@memberof ZipkinTraceExporter