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

Edge metrics POST interval grows unexpectedly. #436

Closed
chriswk opened this issue Feb 29, 2024 · 0 comments · Fixed by #437
Closed

Edge metrics POST interval grows unexpectedly. #436

chriswk opened this issue Feb 29, 2024 · 0 comments · Fixed by #437
Assignees
Labels
bug Something isn't working

Comments

@chriswk
Copy link
Member

chriswk commented Feb 29, 2024

Describe the bug

After running edge for a while I spotted that it was suddenly sleeping for 62 seconds, and then 64 seconds. Double checking I see that we add jitter to previous interval instead of resetting back to initial configured duration before adding jitter.

Steps to reproduce the bug

  1. Start edge with RUST_LOG=warn,unleash_edge=trace
  2. Observe
2024-02-29T12:09:33.846888Z TRACE unleash_edge::http::background_send_metrics: Done posting traces. Sleeping for 62 seconds and then going again
2024-02-29T12:09:33.846888Z TRACE unleash_edge::http::background_send_metrics: Done posting traces. Sleeping for 70 seconds and then going again
  1. ?
  2. Profit?

Expected behavior

Interval should never exceed initial configured interval + max_jitter unless we're erroring. Since all posts succeeded, we probably shouldn't add jitter at all. the normal interval due to random startup times should be enough

Logs, error output, etc.

2024-02-29T12:09:33.846888Z TRACE unleash_edge::http::background_send_metrics: Done posting traces. Sleeping for 70 seconds and then going again

Screenshots

No response

Additional context

No response

Unleash version

Edge 17.1.0

Subscription type

None

Hosting type

None

SDK information (language and version)

No response

@chriswk chriswk added the bug Something isn't working label Feb 29, 2024
@chriswk chriswk self-assigned this Feb 29, 2024
chriswk added a commit that referenced this issue Feb 29, 2024
Previously we used the previous iteration of the loop's interval to
decide next interval. This PR changes to always use the initial
send_interval as what to base the interval calculation of

fixes: #436
chriswk pushed a commit that referenced this issue Feb 29, 2024
Previously we used the previous iteration of the loop's interval to
decide next interval. This PR changes to always use the initial
send_interval as what to base the interval calculation of

fixes: #436
@github-project-automation github-project-automation bot moved this from New to Done in Issues and PRs Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant