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 Usage API #41

Merged
merged 5 commits into from
Sep 27, 2024
Merged

Add Usage API #41

merged 5 commits into from
Sep 27, 2024

Conversation

shivam-ajmera
Copy link
Member

@shivam-ajmera shivam-ajmera commented Sep 24, 2024

What was changed

Add a Usage API

Why?

To track usage data across namespaces

Checklist

  • Generated protos with make proto.
  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@shivam-ajmera shivam-ajmera marked this pull request as ready for review September 24, 2024 19:53
// Filter for UTC time >= - optional.
// Defaults to: start of the current month.
// Must be: within the last 90 days from the current date.
// Must be: midnight UTC time.

Choose a reason for hiding this comment

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

Meaning, if any timestamp that is not midnight UTC time--regardless of the date--validation will fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is correct, currently it's a strict requirement since we only support Day granularity

}

message RecordGroup {
repeated GroupBy group_bys = 1;

Choose a reason for hiding this comment

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

🤔 Curious about this usage. Is it intended that GroupByKey would become a logical AND if multiple are provided?

Copy link
Member Author

@shivam-ajmera shivam-ajmera Sep 24, 2024

Choose a reason for hiding this comment

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

Good question, that is correct. Currently it defaults to (and allows) only 1 key i.e. grouping by namespace. But multiple would mean logical AND (updated comment in the code)

@@ -19,6 +19,7 @@ message Summary {
// Records grouped by namespace
repeated RecordGroup record_groups = 3;
// True if data for given time window is not fully available yet (e.g. delays)
// When true, records could be added in the future (until false)
Copy link
Member

Choose a reason for hiding this comment

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

"records could be added or updated for the given start_time and end_time" or something like that

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated: When true, records for the given time range could still be added/updated in the future (until false)

@shivam-ajmera shivam-ajmera merged commit 7887a9c into main Sep 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants