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

Add warnings for suspect configurations #294

Merged

Conversation

dgzlopes
Copy link
Member

@dgzlopes dgzlopes commented Oct 30, 2020

What this PR does:
Warns the user if the configuration looks strange.

Which issue(s) this PR fixes:
Fixes #244

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

cmd/tempo/main.go Show resolved Hide resolved
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
Signed-off-by: Daniel González Lopes <danielgonzalezlopes@gmail.com>
@dgzlopes dgzlopes force-pushed the warnings-for-suspect-configurations branch from 054cac4 to 4ff5c60 Compare October 31, 2020 15:50
@@ -76,6 +76,9 @@ func main() {
// Allocate a block of memory to alter GC behaviour. See https://github.com/golang/go/issues/23044
ballast := make([]byte, *ballastMBs*1024*1024)

// Warn the user for suspect configurations
config.CheckConfig()

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved the check to its own method. I'm not sure if the method name is descriptive enough 😅

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

Very nice. Thanks for the work!

@joe-elliott joe-elliott merged commit 077fd13 into grafana:master Nov 2, 2020
@dgzlopes dgzlopes deleted the warnings-for-suspect-configurations branch November 2, 2020 06:58
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.

Add warnings for suspect configs
2 participants