-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Allow operators to opt into publishing node and alloc metrics #1501
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1397,7 +1397,11 @@ func (c *Client) collectHostStats() { | |
c.resourceUsageLock.Lock() | ||
c.resourceUsage = ru | ||
c.resourceUsageLock.Unlock() | ||
c.emitStats(ru) | ||
|
||
// Publish Node metrics if operator has opted in | ||
if c.config.PublishNodeMetrics { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like you check the config settings inside the function. Are you sure you need the guard up here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @slackpad We do that in the |
||
c.emitStats(ru) | ||
} | ||
case <-c.shutdownCh: | ||
return | ||
} | ||
|
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.
I would make it default as true and let people who want to disable it disable it.
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.
We are keeping the default false since the volume of metrics Nomad emits is quite large.