-
Notifications
You must be signed in to change notification settings - Fork 84
actions metering metadata proto definition #701
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
Changes from all commits
7b76cb6
0a9722e
4333a28
43c6f36
9f11073
355166e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package temporal.api.server.v1; | ||
|
|
||
| option go_package = "go.temporal.io/api/server/v1;server"; | ||
| option java_package = "io.temporal.api.server.v1"; | ||
| option java_outer_classname = "MessageProto"; | ||
| option java_multiple_files = true; | ||
|
|
||
| message ActionMetadata { | ||
| // A history event can be attributed to multiple metering subtypes | ||
| // Ex. EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, which is used by both Start | ||
| // Workflow Execution and Scheduled Workflow Executions. | ||
| // grpc:StartWorkflowExecution and grpc:StartWorkflowExecution.Scheduled.Adjusted | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TO-DO: remove this line |
||
| repeated Action actions = 1; | ||
|
Comment on lines
+11
to
+15
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a bit confusing to read as a public consumer of the API. Not sure "metering subtypes" and such make sense here. From an outsider POV, can you help me understand when this field would be set and on which history events?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this is a starter but definitely will need a more comprehensive explanation. The idea is that history events are attributed to a potentially billable aspect. For example, if we come across a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not think you should store redundant action information in history if it can be reliably derived from history based on known events. Adding this redundant information affects everyone's history format that they store on disk for several uses and it's unnecessary information. We should instead just store action information that otherwise cannot be derived from history (e.g. queries and heartbeats). And IMO that information doesn't need to be on history anyways, it can be part of general workflow information.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that this information can be derived from history and it may be redundant, but the objective here is to improve billing visibility so that by having this metadata readily available in history, users would not have to implement their own billing analyzer logic in order for them to calculate their Temporal usages/bills. To minimize polluting this field, we are ideally starting small by only including the most relevant fields required.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Attaching some resources that may provide a bit more context on the initiative:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a public repo, internal links may not make as much sense, can discuss internally
No, we can implement this for them. Someone already has to implement some logic to count the actions, how is counting the events different?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here are a few other potential options if we feel strongly about not adding metering metadata to the history event:
Any preferences between the above two, or are there any other options we are missing
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea behind using a repeated message here is that we can have multiple actions attributed to a |
||
| } | ||
|
|
||
| message Action { | ||
| int32 action_count = 1; | ||
| } | ||
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.
metering subtypesactions