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

Breadcrumb

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

function MeterProvider::getMeter

Overrides MeterProviderInterface::getMeter

File

vendor/open-telemetry/sdk/Metrics/MeterProvider.php, line 59

Class

MeterProvider

Namespace

OpenTelemetry\SDK\Metrics

Code

public function getMeter(string $name, ?string $version = null, ?string $schemaUrl = null, iterable $attributes = []) : MeterInterface {
    if ($this->closed || Sdk::isDisabled()) {
        
        //@todo create meter provider from factory, and move Sdk::isDisabled() there
        return new NoopMeter();
    }
    $meter = new Meter($this->metricFactory, $this->resource, $this->clock, $this->stalenessHandlerFactory, $this->metricReaders, $this->viewRegistry, $this->exemplarFilter, $this->instruments, $this->instrumentationScopeFactory
        ->create($name, $version, $schemaUrl, $attributes), $this->registry, $this->writer, $this->destructors, $this->configurator);
    $this->meters
        ->offsetSet($meter, null);
    return $meter;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal