-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(metrics): add missing stat metric scopes #3416
fix(metrics): add missing stat metric scopes #3416
Conversation
The image build failed because of this:
|
@@ -60,7 +60,7 @@ func (p *InstrumentedProjectCommandRunner) StateRm(ctx command.ProjectContext) c | |||
|
|||
func RunAndEmitStats(commandName string, ctx command.ProjectContext, execute func(ctx command.ProjectContext) command.ProjectResult, scope tally.Scope) command.ProjectResult { | |||
// ensures we are differentiating between project level command and overall command | |||
scope = ctx.SetProjectScopeTags(scope) | |||
scope = ctx.SetProjectScopeTags(scope).SubScope(commandName) |
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.
Is there a test that we can add to ensure that this functionality doesn't break again in the future?
Thanks for the fix @albertorm95. Hopefully this works as expected going forward. If you have time, please consider adding a unit test for this in a follow up pr. I wanted to merge since this is a highly requested fix and we're planning to do a release soon. In the mean time, please use the |
…Runner (runatlantis#3416) Co-authored-by: nitrocode <[email protected]>
…Runner (runatlantis#3416) Co-authored-by: nitrocode <[email protected]>
…Runner (runatlantis#3416) Co-authored-by: nitrocode <[email protected]>
what
project
andcommandName
SubScope to CommandRunner scope.atlantis_cmd_comment_%COMMAND_project_execution_success
->atlantis_project_%COMMAND_execution_success
why
atlantis_project_execution_success
metric there was no way of knowing if it was aplan
,apply
, etc.tests
atlantis_cmd_comment_%COMMAND_project_execution_success
- >atlantis_project_%COMMAND_execution_success
references
closes:
relates:
blocked by: