-
Notifications
You must be signed in to change notification settings - Fork 766
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
Emit action metrics for batch of markers #4905
Conversation
// One workflow task response may contain multiple marker commands. Each marker will emit one | ||
// command_RecordMarker_Xxx action metric. Depending on pricing model, you may want to ignore all individual | ||
// command_RecordMarker_Xxx and use command_BatchMarkers instead. | ||
metricsHandler.Counter(metrics.ActionCounter.GetMetricName()).Record(1, metrics.ActionType("command_BatchMarkers")) |
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.
so action
metric will double count? and people need to change the query to exclude either all of command_RecordMarker_Xxx or command_BatchMarkers to get the right count?
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.
Yes. Current OSS action metrics include all commands, but not all commands are billable actions.
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.
cc @feihuang after ^ is deployed, the sum of action
metric across action_type
will double count.
<!-- Describe what has changed in this PR --> **What changed?** Add action metric for batch of markers <!-- Tell your future self why have you made these changes --> **Why?** Markers in one workflow task maybe counted as one action. <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> **How did you test it?** <!-- Assuming the worst case, what can be broken when deploying this change to production? --> **Potential risks** <!-- Is this PR a hotfix candidate or require that a notification be sent to the broader community? (Yes/No) --> **Is hotfix candidate?**
<!-- Describe what has changed in this PR --> **What changed?** Add action metric for batch of markers <!-- Tell your future self why have you made these changes --> **Why?** Markers in one workflow task maybe counted as one action. <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> **How did you test it?** <!-- Assuming the worst case, what can be broken when deploying this change to production? --> **Potential risks** <!-- Is this PR a hotfix candidate or require that a notification be sent to the broader community? (Yes/No) --> **Is hotfix candidate?**
<!-- Describe what has changed in this PR --> **What changed?** Add action metric for batch of markers <!-- Tell your future self why have you made these changes --> **Why?** Markers in one workflow task maybe counted as one action. <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> **How did you test it?** <!-- Assuming the worst case, what can be broken when deploying this change to production? --> **Potential risks** <!-- Is this PR a hotfix candidate or require that a notification be sent to the broader community? (Yes/No) --> **Is hotfix candidate?**
What changed?
Add action metric for batch of markers
Why?
Markers in one workflow task maybe counted as one action.
How did you test it?
Potential risks
Is hotfix candidate?