-
Notifications
You must be signed in to change notification settings - Fork 71
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 kafka metrics related to local queue size #158
Conversation
interval := time.Minute | ||
t := time.NewTicker(interval) | ||
for range t.C { | ||
total := p.kafkaProducer.Len() |
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.
this is total length including the delivered events
ad9d5fc
to
08fd7d2
Compare
datastore/kafka/kafka.go
Outdated
produceAckCount adapter.Counter | ||
bytesAckTotal adapter.Counter | ||
errorCount adapter.Counter | ||
produceQueueSize adapter.Gauge |
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.
producer
QueueSize?
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.
updated
datastore/kafka/kafka.go
Outdated
@@ -130,6 +132,18 @@ func (p *Producer) logError(err error) { | |||
metricsRegistry.errorCount.Inc(map[string]string{}) | |||
} | |||
|
|||
func (p *Producer) reportProducerMetrics() { | |||
interval := time.Minute |
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.
One minutes feels like a really long interval; 5s? It should be super cheap right?
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.
updated
Adds a go routine which periodically tracks pending messages to be sent to the broker.
08fd7d2
to
90937f8
Compare
Description
Adds a go routine which periodically tracks pending messages to be sent to the broker.
Type of change
Please select all options that apply to this change:
Checklist:
Confirm you have completed the following steps: