-
Notifications
You must be signed in to change notification settings - Fork 56
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
Feature/metrics enable flag #100
Conversation
collector/metrics.go
Outdated
log "github.com/sirupsen/logrus" | ||
) | ||
|
||
// ErrResourceNotConfigure defines the error when the resource not configure |
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.
not configure -> is not configured.
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.
fixed
collector/metrics.go
Outdated
return metricsResponse, ErrResourceNotConfigure | ||
} | ||
|
||
// loop on resource metrics and extract only the enable metrics |
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.
enable -> enabled
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.
fixed
collector/metrics.go
Outdated
return metricsResponse, nil | ||
} | ||
|
||
// IsResourceEnable checks if the resource configure and enabled |
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.
configure -> is configured
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.
fixed
collector/metrics.go
Outdated
} | ||
|
||
if !resource.Enable { | ||
logger.Info("resource has not enable metrics") |
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.
has not enable --> has not enabled
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.
fixed
What type of PR is this?
/Feature
What this PR does / why we need it:
Add the option to enable/disable resource detection according to collector's configuration
Which issue(s) this PR fixes (if exists):
Fixes #94