| Modifier and Type | Method and Description |
|---|---|
| public default DoubleGauge | Returns: The DoubleGauge instrument.Builds and returns a DoubleGauge instrument with the configuration. |
| public default ObservableDoubleMeasurement | Returns: an observable measurement that batch callbacks use to observe values.Build an observer for this instrument to observe values from a |
| public ObservableDoubleGauge | buildWithCallback(Consumer<ObservableDoubleMeasurement>
A callback which observes measurements when invoked. callback)Builds an Asynchronous Gauge instrument with the given callback. |
| public LongGaugeBuilder | |
| public DoubleGaugeBuilder | |
| public DoubleGaugeBuilder |
| build | back to summary |
|---|---|
| public default DoubleGauge build() Builds and returns a DoubleGauge 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 ObservableDoubleMeasurement 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 ObservableDoubleGauge buildWithCallback(Consumer<ObservableDoubleMeasurement> 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:
| |
| ofLongs | back to summary |
|---|---|
| public LongGaugeBuilder ofLongs() Sets the Gauge for recording | |
| setDescription | back to summary |
|---|---|
| public DoubleGaugeBuilder setDescription(String description) Sets the description for this instrument.
| |
| setUnit | back to summary |
|---|---|
| public DoubleGaugeBuilder setUnit(String unit) Sets the unit of measure for this instrument.
| |