-
Notifications
You must be signed in to change notification settings - Fork 238
Added metrics for the encoding manager. #967
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
Added metrics for the encoding manager. #967
Conversation
Signed-off-by: Cody Littley <[email protected]>
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.
lgtm!
@@ -154,5 +176,12 @@ func RunController(ctx *cli.Context) error { | |||
return fmt.Errorf("failed to start dispatcher: %v", err) | |||
} | |||
|
|||
go func() { |
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.
should we have this routine start in encodingManager.Start
instead?
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 thought about this before you commented. The core issue is that RunController()
starts both the encoding manager and the dispatcher, and we only want to use a single metrics server that they both share.
} | ||
|
||
func (m *encodingManagerMetrics) reportBatchSubmissionLatency(duration time.Duration) { | ||
m.batchSubmissionLatency.WithLabelValues().Observe(float64(duration.Nanoseconds()) / float64(time.Millisecond)) |
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.
why do we need this division? can we just report duration.Millisecond
?
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.
My dislike for Milliseconds()
is that it reports an integer value, but we are measuring things where sub-millisecond accuracy may end up being meaningful. Converting from nanoseconds is more cumbersome, but utilizes the full accuracy of the clock.
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.
but we are measuring things where sub-millisecond accuracy may end up being meaningful
Not sure if this is true, but I'm fine with this
batchSize *prometheus.GaugeVec | ||
batchDataSize *prometheus.GaugeVec | ||
batchRetryCount *prometheus.GaugeVec | ||
batchSleepTime *prometheus.GaugeVec |
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 sure if this metric would be useful given that it's already tracking retry count?
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.
removed
Signed-off-by: Cody Littley <[email protected]>
Why are these changes needed?
Add metrics for the encoding manager.
Checks