ttrss/vendor/open-telemetry/sdk/Logs/Exporter/NoopExporter.php

29 lines
749 B
PHP
Raw Normal View History

2023-10-20 14:12:29 +00:00
<?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;
}
}