Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.6.0
-
None
-
None
Description
Samza currently has a JmxReporter, which exposes Samza's metrics via JMX, so they can be viewed in things like VisualVM, JConsole, etc. It would be nice to have the inverse of this, as well: the ability to scrape metrics from JMX beans, and inject them into Samza's metrics framework.
The main motivation for adding this support is to allow us to collect metrics for third party libraries that don't use Samza's metrics framework. Since most libraries expose information via JMX, it's can be used as a common bridge that we can pull metrics out of.
One way to implement this would be to write a JmxMetricsScraper that implements TaskLifecycleListener. In the beforeInit method, it could grab the metrics registry and config objects, connect to the local process' JMX beans, and start scraping the relevant metrics.