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

feat: configurable Prometheus remote write timeout #4

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

pvoborni
Copy link
Member

@pvoborni pvoborni commented Oct 3, 2023

Makes it possible to change timeout of http client which does Prometheus remote write via:

  • write_timeout_sec in config file
  • HOST_METERING_WRITE_TIMEOUT_SEC env var

Makes it possible to change timeout of http client which does Prometheus
remote write via:

- `write_timeout_sec` in config file
- `HOST_METERING_WRITE_TIMEOUT_SEC` env var

Signed-off-by: Petr Vobornik <[email protected]>
@ehelms
Copy link
Member

ehelms commented Oct 3, 2023

What happens if the write timeout exceeds the write interval? In other words, if the timeout is greater than 10 minutes and it think it needs to send another write?

@pvoborni
Copy link
Member Author

pvoborni commented Oct 3, 2023

Tthere would be multiple writes happening at the same time. That is something we should avoid as it might lead to erroneous behavior (sending same samples multiple times -> error from server).

@ehelms
Copy link
Member

ehelms commented Oct 3, 2023

Tthere would be multiple writes happening at the same time. That is something we should avoid as it might lead to erroneous behavior (sending same samples multiple times -> error from server).

You want to tackle that here or track it as a follow up? Should we cap the timeout to less than the write interval no matter what is passed?

@pvoborni
Copy link
Member Author

pvoborni commented Oct 3, 2023

It's bit more complicated as there are also re-tries. So it's better to tackle separately.

@pvoborni pvoborni merged commit 5fd555e into RedHatInsights:main Oct 4, 2023
1 check passed
Copy link

github-actions bot commented Nov 7, 2023

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants