ttrss/vendor/open-telemetry/sdk/Metrics/NoopMeterProvider.php

27 lines
552 B
PHP
Raw Normal View History

2023-10-20 14:12:29 +00:00
<?php
declare(strict_types=1);
namespace OpenTelemetry\SDK\Metrics;
use OpenTelemetry\API\Metrics\MeterInterface;
use OpenTelemetry\API\Metrics\Noop\NoopMeter;
class NoopMeterProvider implements MeterProviderInterface
{
public function shutdown(): bool
{
return true;
}
public function forceFlush(): bool
{
return true;
}
public function getMeter(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []): MeterInterface
{
return new NoopMeter();
}
}