Skip to content
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

Feature: support for plugglabe metrics suppliers #96

Open
chicobento opened this issue Mar 26, 2021 · 3 comments
Open

Feature: support for plugglabe metrics suppliers #96

chicobento opened this issue Mar 26, 2021 · 3 comments

Comments

@chicobento
Copy link

We have a set of cassandra plugins developed within the company. The plugins are exposing their own set of metrics via JMX.
We would like to expose those metrics to prometheus via cassandra-exporter along the standard set of supported metrics.
Please, provide a way of plugging in new metrics.

By looking at the code, I found that it could be potentially achieved by dynamically loading FactoriesSupplier classes.
Simple solution is to load multiple FactoriesSuppliers via java.util.ServiceLoader facility.

Please let me know your thoughts and I may contribute with a PR if such feature is acceptable.

@chicobento
Copy link
Author

I created an initial PR. Some other refactoring may be done such as providing the existing metrics in FactoriesSupplier via the FactoryProvider interface.

With this feature, the #74 issue is still more relevant, so that cassandra-exporter plugins can get the common.jar dependency for compilation via maven or gradle.

@zegelin
Copy link

zegelin commented Apr 12, 2021

Thanks for the PR @chicobento. I really like the idea of having dynamic providers. In fact, this could even be a good path forward to enabling compatibility with C* 4.0 (since it'll need a different set of collectors).

@chicobento
Copy link
Author

Hi @zegelin , yes, I was thinking on splitting the core module from the 'default' collector provider lets say, but that would make the deployment a bit more tricky for now - however this could be something to consider with the C* 4.0 in the landscape.

Just so you know, I did some integration tests internally and it is working fine: my cassandra plugin metrics can be seen on the scrap interface.
Pls let me know your feedback on the PR and the minimal changes to get it merged - I might have some time to work on adjustments over the next days if needed.

ps: the company has intention on opening the code for the plugin, so both its core code and the cassandra-exporter integration should be available in github in near future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants