You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating multiple observable gauges and I'm seeing that if I don't set gauges myself, old values of other gauges get copied into it somehow. I'm emitting metrics to the opentelemetry collector.
Reproduction
use opentelemetry::global;use opentelemetry_sdk::runtime::Tokio;use std::time::Duration;#[tokio::main]asyncfnmain() -> eyre::Result<()>{
opentelemetry_otlp::new_pipeline().metrics(Tokio).with_period(Duration::from_secs(10)).with_exporter(opentelemetry_otlp::new_exporter().tonic()).build()?;let meter = global::meter("test");let a = meter.i64_observable_gauge("a").init();let b = meter.i64_observable_gauge("b").init();
meter.register_callback(&[b.as_any()],move |observer| {
observer.observe_i64(&b,123,&[]);})?;letmut interval = tokio::time::interval(Duration::from_secs(60));loop{
interval.tick().await;}}
Logs note
I configured opentelemetry-collector with the debug exporter with verbosity = "detailed". You can see that the first export of metrics is fine, and then the second contains an extra entry for the 'a' gauge even though it doesn't get observed anywhere. The value is the value of the b gauge.
@bouk thanks for reporting this. It does appear to be a regression when gauges are not written to (last value aggregation without a last value). Should have a fix shortly.
What happened?
Hi,
I'm creating multiple observable gauges and I'm seeing that if I don't set gauges myself, old values of other gauges get copied into it somehow. I'm emitting metrics to the opentelemetry collector.
Reproduction
Logs note
I configured opentelemetry-collector with the debug exporter with verbosity = "detailed". You can see that the first export of metrics is fine, and then the second contains an extra entry for the 'a' gauge even though it doesn't get observed anywhere. The value is the value of the b gauge.
API Version
0.21
SDK Version
0.21
What Exporters are you seeing the problem on?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: