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

AbstractTimeWindowHistogram produces wrong values after long period of inactivity #3395

Closed
MalyginaEkaterina opened this issue Sep 7, 2022 · 3 comments

Comments

@MalyginaEkaterina
Copy link

Describe the bug
After a long period of inactivity Timer percentile values become equal to 0.0.

Environment

  • Micrometer version: 1.8.3
  • Micrometer registry: prometheus
  • OS: Windows
  • Java version: 11.0.14

To Reproduce

  1. Set expiry in DistributionStatisticConfig to 60 seconds.
  2. Start the app, invoke the method with @timed annotation.
  3. Wait 150 seconds, invoke the method with @timed annotation again.
  4. Get prometheus metrics.

Expected behavior
Timer percentile values not equal to 0.0.

Additional context
The bug is very similar to #2647

AbstractTimeWindowHistogram::lastRotateTimestampMillis does increase by more than durationBetweenRotatesMillis * ringBuffer.length during one rotate(), so the rotate() called from takeSnapshot() will reset all buckets to zero even if called immediately after recordDouble()

@marcingrzejszczak
Copy link
Contributor

Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file. Thank you!

@marcingrzejszczak marcingrzejszczak added the waiting for feedback We need additional information before we can continue label Dec 20, 2023
Copy link

github-actions bot commented Jan 2, 2024

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Copy link

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
@jonatan-ivanov jonatan-ivanov removed waiting for feedback We need additional information before we can continue waiting-for-triage feedback-reminder labels Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants