Move Exporter to /collector so it can be used as a library#209
Move Exporter to /collector so it can be used as a library#209SuperQ merged 1 commit intoprometheus:masterfrom
Conversation
|
Great idea! |
|
Builds now, I can rebase if you wish. |
This is not a recommended way to deploy things, see https://prometheus.io/docs/instrumenting/writing_exporters/#deployment |
|
@brian-brazil I know that. It doesn't change anything for prometheus exporters. It lets me to implement my own http server, with my own modifications... which I will likely try to push upstream if they make sense for you guys, but there might be some that doesn't. This keeps cli and http interface in one package, and collector in another one - making easier to develop things on top of the collector.
|
|
Looks like this needs a rebase. |
a3e396f to
2afc97b
Compare
2afc97b to
5ad6fbd
Compare
|
Done. |
|
@grobie PTAL |
|
nevermind, my bad! |
This decouples collector implementation from http server and cli client.
This way I can create my own binary with several collectors by using
collector.New.All scrappers were already in
/collectorsubpackage, so I just movedExporterstruct which is implementation of prometheusCollector, also to/collectorsubpackage.