| Modifier and Type | Method and Description |
|---|---|
| public default LongGauge | Returns: The LongGauge instrument.Builds and returns a LongGauge instrument with the configuration. |
| public default ObservableLongMeasurement | Returns: an observable measurement that batch callbacks use to observe values.Build an observer for this instrument to observe values from a |
| public ObservableLongGauge | buildWithCallback(Consumer<ObservableLongMeasurement>
A callback which observes measurements when invoked. callback)Builds an Asynchronous Gauge instrument with the given callback. |
| public LongGaugeBuilder | |
| public LongGaugeBuilder |
| build | back to summary |
|---|---|
| public default LongGauge build() Builds and returns a LongGauge instrument with the configuration. Note This produces a synchronous gauge which records gauge values as they occur. Most users
will want to instead register an If using the OpenTelemetry SDK, by default gauges use last value aggregation, such that only the value of the last recorded measurement is exported.
| |
| buildObserver | back to summary |
|---|---|
| public default ObservableLongMeasurement buildObserver() Build an observer for this instrument to observe values from a This observer MUST be registered when creating a
| |
| buildWithCallback | back to summary |
|---|---|
| public ObservableLongGauge buildWithCallback(Consumer<ObservableLongMeasurement> callback) Builds an Asynchronous Gauge instrument with the given callback. The callback will be called when the instrument is being observed. Callbacks are expected to abide by the following restrictions:
| |
| setDescription | back to summary |
|---|---|
| public LongGaugeBuilder setDescription(String description) Sets the description for this instrument.
| |
| setUnit | back to summary |
|---|---|
| public LongGaugeBuilder setUnit(String unit) Sets the unit of measure for this instrument.
| |