diff options
Diffstat (limited to 'vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php')
-rw-r--r-- | vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php b/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php new file mode 100644 index 000000000..8eeff62bd --- /dev/null +++ b/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +namespace OpenTelemetry\SDK\Logs\Exporter; + +use OpenTelemetry\SDK\Common\Future\CancellationInterface; +use OpenTelemetry\SDK\Common\Future\CompletedFuture; +use OpenTelemetry\SDK\Common\Future\FutureInterface; +use OpenTelemetry\SDK\Logs\LogRecordExporterInterface; + +class NoopExporter implements LogRecordExporterInterface +{ + public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface + { + return new CompletedFuture(true); + } + + public function forceFlush(?CancellationInterface $cancellation = null): bool + { + return true; + } + + public function shutdown(?CancellationInterface $cancellation = null): bool + { + return true; + } +} |