Skip to content

Commit 0b78252

Browse files
authored
Stabilize Gauge (#1701)
1 parent 9eb548a commit 0b78252

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

examples/metrics-basic/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
108108
// Note that there is no ObservableHistogram instrument.
109109

110110
// Create a Gauge Instrument.
111-
// Note that the Gauge instrument is experimental, and can be changed/removed in the future releases.
112-
#[cfg(feature = "otel_unstable")]
113111
{
114112
let gauge = meter
115113
.f64_gauge("my_gauge")

opentelemetry/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- [#1623](https://github.com/open-telemetry/opentelemetry-rust/pull/1623) Add global::meter_provider_shutdown
88
- [#1640](https://github.com/open-telemetry/opentelemetry-rust/pull/1640) Add `PropagationError`
9+
- [#1701](https://github.com/open-telemetry/opentelemetry-rust/pull/1701) `Gauge` no longer requires `otel-unstable` feature flag, as OpenTelemetry specification for `Gauge` instrumentation is stable.
910

1011
### Removed
1112

opentelemetry/src/metrics/meter.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ use std::any::Any;
33
use std::borrow::Cow;
44
use std::sync::Arc;
55

6-
#[cfg(feature = "otel_unstable")]
7-
use crate::metrics::Gauge;
86
use crate::metrics::{
9-
AsyncInstrumentBuilder, Counter, Histogram, InstrumentBuilder, InstrumentProvider,
7+
AsyncInstrumentBuilder, Counter, Gauge, Histogram, InstrumentBuilder, InstrumentProvider,
108
ObservableCounter, ObservableGauge, ObservableUpDownCounter, Result, UpDownCounter,
119
};
1210
use crate::KeyValue;
@@ -335,32 +333,23 @@ impl Meter {
335333
AsyncInstrumentBuilder::new(self, name.into())
336334
}
337335

338-
/// # Experimental
339-
/// This method is experimental and can be changed/removed in future releases.
340336
/// creates an instrument builder for recording independent values.
341-
#[cfg(feature = "otel_unstable")]
342337
pub fn u64_gauge(
343338
&self,
344339
name: impl Into<Cow<'static, str>>,
345340
) -> InstrumentBuilder<'_, Gauge<u64>> {
346341
InstrumentBuilder::new(self, name.into())
347342
}
348343

349-
/// # Experimental
350-
/// This method is experimental and can be changed/removed in future releases.
351344
/// creates an instrument builder for recording independent values.
352-
#[cfg(feature = "otel_unstable")]
353345
pub fn f64_gauge(
354346
&self,
355347
name: impl Into<Cow<'static, str>>,
356348
) -> InstrumentBuilder<'_, Gauge<f64>> {
357349
InstrumentBuilder::new(self, name.into())
358350
}
359351

360-
/// # Experimental
361-
/// This method is experimental and can be changed/removed in future releases.
362-
/// creates an instrument builder for recording indenpendent values.
363-
#[cfg(feature = "otel_unstable")]
352+
/// creates an instrument builder for recording independent values.
364353
pub fn i64_gauge(
365354
&self,
366355
name: impl Into<Cow<'static, str>>,

0 commit comments

Comments
 (0)