InstrumentDescriptor

class InstrumentDescriptor(val scope: String, val name: String, val units: String? = null, val description: String? = null)

Identifies the instrument that produced a MetricData.

Doubles as the registry key for synchronous instruments: repeated createMonotonicCounter("calls") calls must resolve to the same aggregation state rather than each publishing a partial series.

Parameters

scope

the instrumentation scope from MeterProvider.getOrCreateMeter; the SDK passes the service client's name.

name

used verbatim as the metric name by exporters.

units

an optional unit string ("ms", "By", ...) mapped to a backend-specific unit at export time. Null means unitless.

description

optional text, ignored by backends with no field for it.

Constructors

Link copied to clipboard
constructor(scope: String, name: String, units: String? = null, description: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String