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
csv export: override default max days (default: 90d) #2165
csv export: override default max days (default: 90d) #2165
Conversation
9089c8e
to
a1490f6
Compare
Thanks for the PR (with tests)! I'm going to ping @r2k1 and his team since they wrote the original feature, hopefully he'll weigh in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, LGTM. I would only ask to rename the ENV variable.
The 90 days selection was arbitrary, chosen for checking the oldest data in Prometheus. If this causes issues on some Prometheus setups, we can reduce it. I don't anticipate problems with existing deployments. However, reducing this period would affect the data amount exported on initial runs where opencost has been active for extended periods without CSV export.
An alternative is to execute multiple 30-day range queries. This may eliminate the need from users to configure an extra ENV variable.
a1490f6
to
1372b08
Compare
1372b08
to
1e41880
Compare
With @r2k1's approval I'm going to get this lined up for inclusion in 1.107. Thanks! |
f3f038f
to
65be6ae
Compare
Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
65be6ae
to
4c97f55
Compare
What does this PR change?
Does this PR relate to any other PRs?
How will this PR impact users?
Does this PR address any GitHub or Zendesk issues?
How was this PR tested?
Does this PR require changes to documentation?
Have you labeled this PR and its corresponding Issue as "next release" if it should be part of the next OpenCost release? If not, why not?