-
Notifications
You must be signed in to change notification settings - Fork 771
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
Move Exporter to /collector so it can be used as a library #209
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. |
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
@grobie PTAL |
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
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
/collector
subpackage, so I just movedExporter
struct which is implementation of prometheusCollector
, also to/collector
subpackage.