Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StreamFactory.php

function StreamFactory::createExemplarReservoir

1 call to StreamFactory::createExemplarReservoir()
StreamFactory::createSynchronousWriter in vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php

File

vendor/open-telemetry/sdk/Metrics/MetricFactory/StreamFactory.php, line 133

Class

StreamFactory
@internal

Namespace

OpenTelemetry\SDK\Metrics\MetricFactory

Code

private function createExemplarReservoir(AggregationInterface $aggregation, ?ExemplarFilterInterface $exemplarFilter) : ?ExemplarReservoirInterface {
    if (!$exemplarFilter) {
        return null;
    }
    if ($aggregation instanceof ExplicitBucketHistogramAggregation && $aggregation->boundaries) {
        $exemplarReservoir = new HistogramBucketReservoir($aggregation->boundaries);
    }
    else {
        $exemplarReservoir = new FixedSizeReservoir();
    }
    return new FilteredReservoir($exemplarReservoir, $exemplarFilter);
}
RSS feed
Powered by Drupal