diff options
Diffstat (limited to 'vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php')
-rw-r--r-- | vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php b/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php new file mode 100644 index 000000000..a1e228eef --- /dev/null +++ b/vendor/open-telemetry/sdk/Metrics/MetricFactoryInterface.php @@ -0,0 +1,41 @@ +<?php + +declare(strict_types=1); + +namespace OpenTelemetry\SDK\Metrics; + +use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeInterface; +use OpenTelemetry\SDK\Metrics\Exemplar\ExemplarFilterInterface; +use OpenTelemetry\SDK\Metrics\MetricRegistry\MetricRegistryInterface; +use OpenTelemetry\SDK\Resource\ResourceInfo; + +/** + * @internal + */ +interface MetricFactoryInterface +{ + /** + * @param iterable<array{ViewProjection, MetricRegistrationInterface}> $views + */ + public function createAsynchronousObserver( + MetricRegistryInterface $registry, + ResourceInfo $resource, + InstrumentationScopeInterface $instrumentationScope, + Instrument $instrument, + int $timestamp, + iterable $views + ): array; + + /** + * @param iterable<array{ViewProjection, MetricRegistrationInterface}> $views + */ + public function createSynchronousWriter( + MetricRegistryInterface $registry, + ResourceInfo $resource, + InstrumentationScopeInterface $instrumentationScope, + Instrument $instrument, + int $timestamp, + iterable $views, + ?ExemplarFilterInterface $exemplarFilter = null + ): array; +} |