running = false; return true; } /** @see https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/trace/sdk.md#forceflush-2 */ public function forceFlush(?CancellationInterface $cancellation = null): bool { return true; } /** * @param iterable $batch * @return FutureInterface */ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface { if (!$this->running) { return new CompletedFuture(false); } return new CompletedFuture($this->doExport($batch)); /** @phpstan-ignore-line */ } /** * @param iterable $spans Batch of spans to export */ abstract protected function doExport(iterable $spans): bool; /** @phpstan-ignore-line */ }