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

Breadcrumb

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

function DeltaStorage::add

File

vendor/open-telemetry/sdk/Metrics/Stream/DeltaStorage.php, line 27

Class

DeltaStorage
@internal @phan-file-suppress PhanUndeclaredTypeParameter, PhanUndeclaredTypeProperty

Namespace

OpenTelemetry\SDK\Metrics\Stream

Code

public function add(Metric $metric, int|GMP $readers) : void {
    
    /** @phpstan-ignore-next-line */
    if ($readers == 0) {
        return;
    }
    if (($this->head->prev->readers ?? null) != $readers) {
        $this->head->prev = new Delta($metric, $readers, $this->head->prev);
    }
    else {
        assert($this->head->prev !== null);
        $this->mergeInto($this->head->prev->metric, $metric);
    }
}

API Navigation

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