diff --git a/examples/metrics-basic/src/main.rs b/examples/metrics-basic/src/main.rs index cac9ae9159..3a2aa1432d 100644 --- a/examples/metrics-basic/src/main.rs +++ b/examples/metrics-basic/src/main.rs @@ -108,8 +108,6 @@ async fn main() -> Result<(), Box> { // Note that there is no ObservableHistogram instrument. // Create a Gauge Instrument. - // Note that the Gauge instrument is experimental, and can be changed/removed in the future releases. - #[cfg(feature = "otel_unstable")] { let gauge = meter .f64_gauge("my_gauge") diff --git a/opentelemetry/CHANGELOG.md b/opentelemetry/CHANGELOG.md index 380daa3671..256a74a5fd 100644 --- a/opentelemetry/CHANGELOG.md +++ b/opentelemetry/CHANGELOG.md @@ -6,6 +6,7 @@ - [#1623](https://github.com/open-telemetry/opentelemetry-rust/pull/1623) Add global::meter_provider_shutdown - [#1640](https://github.com/open-telemetry/opentelemetry-rust/pull/1640) Add `PropagationError` +- [#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. ### Removed diff --git a/opentelemetry/src/metrics/meter.rs b/opentelemetry/src/metrics/meter.rs index 5d8533e540..71bc453eba 100644 --- a/opentelemetry/src/metrics/meter.rs +++ b/opentelemetry/src/metrics/meter.rs @@ -3,10 +3,8 @@ use std::any::Any; use std::borrow::Cow; use std::sync::Arc; -#[cfg(feature = "otel_unstable")] -use crate::metrics::Gauge; use crate::metrics::{ - AsyncInstrumentBuilder, Counter, Histogram, InstrumentBuilder, InstrumentProvider, + AsyncInstrumentBuilder, Counter, Gauge, Histogram, InstrumentBuilder, InstrumentProvider, ObservableCounter, ObservableGauge, ObservableUpDownCounter, Result, UpDownCounter, }; use crate::KeyValue; @@ -335,10 +333,7 @@ impl Meter { AsyncInstrumentBuilder::new(self, name.into()) } - /// # Experimental - /// This method is experimental and can be changed/removed in future releases. /// creates an instrument builder for recording independent values. - #[cfg(feature = "otel_unstable")] pub fn u64_gauge( &self, name: impl Into>, @@ -346,10 +341,7 @@ impl Meter { InstrumentBuilder::new(self, name.into()) } - /// # Experimental - /// This method is experimental and can be changed/removed in future releases. /// creates an instrument builder for recording independent values. - #[cfg(feature = "otel_unstable")] pub fn f64_gauge( &self, name: impl Into>, @@ -357,10 +349,7 @@ impl Meter { InstrumentBuilder::new(self, name.into()) } - /// # Experimental - /// This method is experimental and can be changed/removed in future releases. - /// creates an instrument builder for recording indenpendent values. - #[cfg(feature = "otel_unstable")] + /// creates an instrument builder for recording independent values. pub fn i64_gauge( &self, name: impl Into>,