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

Fix logic for enabling ui metrics #841

Merged
merged 2 commits into from
Nov 10, 2021
Merged

Fix logic for enabling ui metrics #841

merged 2 commits into from
Nov 10, 2021

Conversation

lkysow
Copy link
Member

@lkysow lkysow commented Nov 4, 2021

Previously ui metrics would be enabled when
global.metrics.enabled=false and ui.metrics.enabled=-. Now that
would cause UI metrics to be disabled which makes sense since "-" means
inherit from global.metrics.enabled.

The logic is now to enable ui metrics when:

ui.enabled &&
  (
    (global.metrics.enabled == true && ui.metrics.enabled == "-") ||
    (ui.metrics.enabled == true)
  )

Fixes #642

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

@lkysow lkysow requested review from a team, kschoche and t-eckert and removed request for a team November 5, 2021 17:12
Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

nice!

Previously ui metrics would be enabled when
`global.metrics.enabled=false` and `ui.metrics.enabled=-`. Now that
would cause UI metrics to be disabled which makes sense since "-" means
inherit from `global.metrics.enabled`.

The logic is now to enable ui metrics when:

```
ui.enabled &&
  (
    (global.metrics.enabled == true && ui.metrics.enabled == "-") ||
    (ui.metrics.enabled == true)
  )
```
@lkysow lkysow merged commit 0ad49a9 into main Nov 10, 2021
@lkysow lkysow deleted the lkysow/ui-metrics-enabled branch November 10, 2021 00:06
rrondeau pushed a commit to rrondeau/consul-k8s that referenced this pull request Dec 21, 2021
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.

helm:UI metrics enabled when global.metrics.enabled=false
3 participants