-
-
Notifications
You must be signed in to change notification settings - Fork 197
Ability to extend and configure desired sink to report lag metrics, adding support to push lag metrics into InfluxDB as well #157
Conversation
Fixed #129 |
@seglo As per #130 (comment), we have rebased with the latest changes and added support to push metrics into InfluxDB too. Please let me know your thoughts. |
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.
Thanks for continuing this effort. I like the sink configuration re-factor. I'm not very familiar with influxdb so I'll need to rely on you to fill in the gaps.
Could you look into adding some tests?
src/main/scala/com/lightbend/kafkalagexporter/InfluxDBPusherSinkConfig.scala
Outdated
Show resolved
Hide resolved
@@ -24,7 +24,7 @@ object MetricsReporter { | |||
case (context, Stop(sender)) => | |||
Behaviors.stopped { () => | |||
metricsSink.stop() | |||
context.log.info("Gracefully stopped Prometheus metrics endpoint HTTP server") | |||
context.log.info("Gracefully stopped metrics sink") |
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 it would be useful here if each sink had a name so it could be logged.
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.
Each sink has a name assigned now and stored in their config object. However, this is not accessible within the scope of this class.
As this is larger change to refactor it, I propose we handle it as separate refactoring effort to log properly with sink names. What do you think ?
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.
Couldn't a name
field be added to MetricsSink
or EndpointSink
and referenced here?
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 addressed by displaying the ClassName that is equivalent to name
field. Can you please resolve this, if that's okay ?
At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user |
87a600f
to
2653fb4
Compare
Merge 3e2f0bfaa3e646c27cb4158c0b547a2fcdd8fdea Merge Cosmetics Syntax Removing files Refactored dependencies Create db test Removed unused import Remove unused Syntax Cosmetics Syntax Removing files Refactored dependencies Create db test Removed unused import Changes to support pushing lag metrics into InfluxDB Removed libraryDependencies from build.sbt
2653fb4
to
2841caf
Compare
@seglo Sure. We have also added Unit tests now to cover InfluxDB integration and followed up on all your other comments. Can you please review again and let us know your thoughts ? |
@seglo Any thoughts/comments ? |
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.
Thanks for pushing this forward. It's looking good. I left some comments.
src/main/scala/com/lightbend/kafkalagexporter/InfluxDBPusherSinkConfig.scala
Outdated
Show resolved
Hide resolved
@@ -24,7 +24,7 @@ object MetricsReporter { | |||
case (context, Stop(sender)) => | |||
Behaviors.stopped { () => | |||
metricsSink.stop() | |||
context.log.info("Gracefully stopped Prometheus metrics endpoint HTTP server") | |||
context.log.info("Gracefully stopped metrics sink") |
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.
Couldn't a name
field be added to MetricsSink
or EndpointSink
and referenced here?
src/test/scala/com/lightbend/kafkalagexporter/InfluxDBPusherSinkTest.scala
Outdated
Show resolved
Hide resolved
src/test/scala/com/lightbend/kafkalagexporter/InfluxDBPusherSinkTest.scala
Outdated
Show resolved
Hide resolved
…use ScalaTest eventually instead of a sleep.
@seglo We have addressed your previous review comments. Can you please do once more pass and hopefully it's good to merge ? |
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.
Thanks. We're getting very close.
src/test/scala/com/lightbend/kafkalagexporter/InfluxDBPusherSinkTest.scala
Outdated
Show resolved
Hide resolved
src/test/scala/com/lightbend/kafkalagexporter/InfluxDBPusherSinkTest.scala
Outdated
Show resolved
Hide resolved
@seglo Glad to hear that we are getting very close. Addressed all your previous comments. Please review when you get a chance. |
Closing/opening ticket to try and trigger a build. |
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
src/main/scala/com/lightbend/kafkalagexporter/InfluxDBPusherSinkConfig.scala
Outdated
Show resolved
Hide resolved
One last thing. Can you update the |
Good point. Updated the |
Looks good. Thanks! |
Follow up of #130 after rebasing with latest release
Note: This retains currently supported Prometheus as the default sink, if it's not configured.