-
Notifications
You must be signed in to change notification settings - Fork 303
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
NEG Metrics #332
NEG Metrics #332
Conversation
pkg/neg/metrics.go
Outdated
var registerMetrics sync.Once | ||
|
||
// Register the metrics that are to be monitored. | ||
func Register() { |
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.
Can you call this RegisterMetrics()
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.
Also it does not need to be exported.
pkg/neg/metrics.go
Outdated
prometheus.CounterOpts{ | ||
Subsystem: negControllerSubsystem, | ||
Name: syncErrorKey, | ||
Help: "Number of execution for a NEG syncer.", |
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 think this help string needs to be changed?
pkg/neg/metrics.go
Outdated
prometheus.GaugeOpts{ | ||
Subsystem: negControllerSubsystem, | ||
Name: lastSyncTimestampKey, | ||
Help: "Gauge measuring the timestamp of the last execution of NEG controller sync loop.", |
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.
Remove "Gauge measuring" from the help string.
9fe8119
to
3022e4b
Compare
Name: syncLatencyKey, | ||
Help: "Sync latency of a NEG syncer", | ||
}, | ||
syncMetricsLabels, |
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.
Do you need the "result" label for this metric? Maybe you can just take a portion of the label slice if you don't need all of them.
4a0f18d
to
8f2c86b
Compare
/lgtm |
promethues dump: