fix(metrics): add missing stat metric scopes#3416
Merged
nitrocode merged 2 commits intorunatlantis:mainfrom May 22, 2023
Merged
fix(metrics): add missing stat metric scopes#3416nitrocode merged 2 commits intorunatlantis:mainfrom
nitrocode merged 2 commits intorunatlantis:mainfrom
Conversation
Contributor
Author
|
The image build failed because of this:
|
This was referenced May 19, 2023
nitrocode
approved these changes
May 19, 2023
nitrocode
reviewed
May 19, 2023
| 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) |
Member
There was a problem hiding this comment.
Is there a test that we can add to ensure that this functionality doesn't break again in the future?
Member
|
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 |
mtavaresmedeiros
pushed a commit
to mtavaresmedeiros/atlantis
that referenced
this pull request
Jul 3, 2023
…Runner (runatlantis#3416) Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
ijames-gc
pushed a commit
to gocardless/atlantis
that referenced
this pull request
Feb 13, 2024
…Runner (runatlantis#3416) Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
ijames-gc
pushed a commit
to gocardless/atlantis
that referenced
this pull request
Feb 13, 2024
…Runner (runatlantis#3416) Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
projectandcommandNameSubScope to CommandRunner scope.atlantis_cmd_comment_%COMMAND_project_execution_success->atlantis_project_%COMMAND_execution_successwhy
atlantis_project_execution_successmetric there was no way of knowing if it was aplan,apply, etc.tests
atlantis_cmd_comment_%COMMAND_project_execution_success- >atlantis_project_%COMMAND_execution_successreferences
closes:
relates:
blocked by: