[Bug]: observable counters and up-down counters always report all historical label set
What happened?
This seems very similar to https://github.com/open-telemetry/opentelemetry-rust/issues/2213.
I have an observable counter for bytes sent/received for my TCP server, with a dynamic label for the client IP/port. As with the linked bug, the last value for each ip/port gets reported, instead of only the current observed values.
Note that the MR for the linked bug seems to be working, since I can't reproduce the bug with observable gauges.
OpenTelemetry API Version (i.e version of opentelemetry crate)
0.31
OpenTelemetry SDK Version (i.e version of opentelemetry_sdk crate)
0.31
What Exporter(s) are you seeing the problem on?
OTLP
Relevant log output
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Yes this is indeed a bug. This was only fixed for ObsGauges, not for Counters/UpDownCounters.