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

Add aggregate_last_24_hours option #11157

Merged
merged 8 commits into from
Jan 20, 2022
Merged

Add aggregate_last_24_hours option #11157

merged 8 commits into from
Jan 20, 2022

Conversation

coignetp
Copy link
Contributor

@coignetp coignetp commented Jan 18, 2022

What does this PR do?

The queries were aggregating entries since the beginning of the day, this PR add a config flag to aggregate the entries in the last 24 hours instead.

Motivation

Since some tables could have a 3 hours latency, the queries since the beginning of the day could be empty and leads to missing metrics. Aggregating the entries in the last 24 hours instead is more consistent.

Additional Notes

@coignetp coignetp requested a review from a team as a code owner January 18, 2022 14:23
@ghost ghost added the documentation label Jan 18, 2022
alai97
alai97 previously approved these changes Jan 18, 2022
snowflake/datadog_checks/snowflake/queries.py Outdated Show resolved Hide resolved
snowflake/datadog_checks/snowflake/check.py Outdated Show resolved Hide resolved
@@ -141,6 +141,14 @@ files:
- snowflake.billing
- snowflake.storage
- snowflake.logins
- name: use_deprecated_aggregation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think about making the option more descriptive, something like aggregate_24_hours? There could be instances where someone would prefer aggregating on the current day

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hesitant to use something like aggregate_24_hours ; as aggregate_24_hours: false does not give that much info on how the queries are aggregated. I'll change the name of the option though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would aggregate_last_24_hours make make more sense?

@coignetp coignetp changed the title Change queries date aggregation to last 24 hours Add aggregate_24_hours option Jan 19, 2022
Co-authored-by: Sarah Witt <sarah.witt@datadoghq.com>
Copy link
Contributor

@sarah-witt sarah-witt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@coignetp coignetp changed the title Add aggregate_24_hours option Add aggregate_last_24_hours option Jan 20, 2022
@coignetp coignetp merged commit 8c07bd0 into master Jan 20, 2022
@coignetp coignetp deleted the paul/sf-queries branch January 20, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants