Skip to content

Refactor exporter so that it can be used as a library. #157

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

Closed
wants to merge 2 commits into from

Conversation

tamalsaha
Copy link

We are using the Postgres exported in our project as a library. This pr refactors the exporter to a collector subpackage so that it can be used as a library.

@tamalsaha tamalsaha force-pushed the master branch 7 times, most recently from a01eb4d to a39a0b8 Compare February 24, 2018 23:05
@coveralls
Copy link

coveralls commented Feb 24, 2018

Coverage Status

Coverage increased (+2.8%) to 57.399% when pulling d07635c on kubedb:master into 3e6cf08 on wrouesnel:master.

@wrouesnel
Copy link
Contributor

I like this commit. I'll refactor it in the next few days to fit the new repository structure just rolled out, but great work!

@wrouesnel wrouesnel mentioned this pull request Mar 5, 2018
wrouesnel added a commit that referenced this pull request Mar 6, 2018
This didn't actually need all that much change, it fits perfectly.
wrouesnel added a commit that referenced this pull request Mar 6, 2018
This didn't actually need all that much change, it fits perfectly.
@wrouesnel
Copy link
Contributor

Okay so looking into this further, I'm merging the overall idea but it's very conditional - it's a supremely hacky way to use it as a library and should be regarded as unstable. The interface is going to be aggressively changed in the near future to factor out all the global variables which make it pretty unsafe to use as is.

wrouesnel added a commit that referenced this pull request Mar 6, 2018
This didn't actually need all that much change, it fits perfectly.
@tamalsaha
Copy link
Author

@wrouesnel, sounds good to me with your caveat. For now we are vendoring. Looking forward to stable state.

@hbagdi
Copy link

hbagdi commented Mar 17, 2018

@wrouesnel friendly ping for any update on this.

@wrouesnel
Copy link
Contributor

Working on it. There's a fair bit of refactoring to make it sensible (and to support multiple exporter instances sanely).

I'm also pulling the built-in queries out to a YAML file format so everything can be overridden.

@wrouesnel
Copy link
Contributor

What am I saying? This Github! - the work libraryize work is happening on this branch here: https://github.com/wrouesnel/postgres_exporter/tree/libraryize_mk2

@tamalsaha
Copy link
Author

@wrouesnel, wondering what are the plans on this one.

@hbagdi
Copy link

hbagdi commented Jun 1, 2018

@wrouesnel any update on this? This would be an awesome feature to monitor multiple Postgres instances using a single exporter. Appreciate your efforts, thank you!

@tamalsaha tamalsaha closed this Jul 30, 2018
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

Successfully merging this pull request may close these issues.

4 participants