-
Notifications
You must be signed in to change notification settings - Fork 217
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
Adds Kafka producer metrics for buffer usage #4139
Adds Kafka producer metrics for buffer usage #4139
Conversation
Signed-off-by: David Venable <[email protected]>
f24d5b0
to
408ac60
Compare
|
||
final Metric metric = metricNameEntry.getValue(); | ||
|
||
pluginMetrics.gauge(dataPrepperMetricName, metric, m -> (double) m.metricValue()); |
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.
Will this metrics be emitted only once when the producer is initialized ?
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.
That should be correct. The producer already exists as it is passed in here, so it does exist.
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 this metrics be continuously emitted at regular interval ? For example the topic metrics are emitted when record is produced.
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.
@dinujoh , I may have misunderstood you at first. Now I see that you are asking if this metric is only emitted once.
Micrometer controls the timing for gauges. So Micrometer will make this call every minute (this is the current configuration) and get the actual value at that point in time. So the metric is updated regularly.
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.
To clarify, Micrometer calls the DoubleFunction
every minute. Thus, it calls m -> (double) m.metricValue()
every minute.
Description
This PR adds three new metrics for the
kafka
buffer:These are not topic-related, so I connected it to the
KafkaProducer
itself.Issues Resolved
N/A
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.