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

Breadcrumb

  1. Drupal Core 11.1.x

GaugeInterface.php

Namespace

OpenTelemetry\API\Metrics

File

vendor/open-telemetry/api/Metrics/GaugeInterface.php

View source
<?php

declare (strict_types=1);
namespace OpenTelemetry\API\Metrics;

use OpenTelemetry\Context\ContextInterface;

/**
 * A synchronous instrument which can be used to record non-additive values.
 *
 * @see https://opentelemetry.io/docs/specs/otel/metrics/api/#gauge
 *
 * @experimental
 */
interface GaugeInterface extends SynchronousInstrument {
    
    /**
     * @param float|int $amount current absolute value
     * @param iterable<non-empty-string, string|bool|float|int|array|null> $attributes
     *        attributes of the data point
     * @param ContextInterface|false|null $context execution context
     *
     * @see https://opentelemetry.io/docs/specs/otel/metrics/api/#record-1
     */
    public function record(float|int $amount, iterable $attributes = [], ContextInterface|false|null $context = null) : void;

}

Interfaces

Title Deprecated Summary
GaugeInterface A synchronous instrument which can be used to record non-additive values.

API Navigation

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