Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: specify how opentelemetry will deal with idle metrics no longer being reported #198

Open
howardyoo opened this issue Feb 25, 2022 · 0 comments

Comments

@howardyoo
Copy link

I've been testing opentelemetry SDK (python) to report counters, gauges to OTEL collector, and found out that when using PeriodicExportingMetricReader to periodically report the collected measurements, even though there is no values actually being reported from the observable gauges, the counters and gauges will keep reporting the last reported values (probably occurring within the reader itself?)

There are a couple of problems associated with this sort of behavior.

  • As for the gauge type of data, the keep reporting the last reported value with new timestamp may pose a confusion that the gauge measurement is still active, even though there's no point actually being reported from the source.
  • There is no way for the users to explicitly access the reader storage and remove the entry - during the lifecycle of the reader.
  • in a highly ephemeral environment - if the sources somehow change often, this may simply create large number of unnecessary telemetry time series that can pose for performance and storage.

Therefore, we may need some clear definition of how long we will keep the idle metrics (which stopped reporting regularly from the sources) to eventually disappear from the reader's metrics storage. As far as I'm aware, it doesn't look like there is any mention of this concept yet in opentelemetry metrics.

A good example is how statsd lets user configure such behavior in its configuration:
https://github.com/statsd/statsd/blob/master/exampleConfig.js?MobileOptOut=1#L61

I hope this issue ticket would steer the development of opentelemetry into a better direction forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant