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

Refactor collectors to not depend of kingpin to be configured #774

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marctc
Copy link

@marctc marctc commented Oct 5, 2023

This PR removes references to kingpin.CommandLine, allowing for the
collector package to be used and configured with a custom kingpin (or no
kingpin at all).

The configuration for collectors has been moved to struct fields, which
the kingpin flags populate at flag parse time. This allows the exporter to be
embeddable in other programs.

@marctc marctc force-pushed the refactor_collector branch 2 times, most recently from 3678363 to 0debdf3 Compare October 5, 2023 12:48
@marctc marctc marked this pull request as ready for review October 5, 2023 12:49
@marctc marctc changed the title Refactor collectors to use config structs Refactor collectors to not depend of kingpin to be configured Oct 5, 2023
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 10, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 10, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
@marctc
Copy link
Author

marctc commented Sep 10, 2024

@SuperQ any change to get a review on this? @cristiangreco will take care of address comments. Thanks!

cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 10, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 10, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 10, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 10, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 11, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 11, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 11, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
cristiangreco added a commit to grafana/alloy that referenced this pull request Sep 12, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
@cristiangreco cristiangreco force-pushed the refactor_collector branch 2 times, most recently from def4a11 to 7bc7b9d Compare October 14, 2024 13:55
This commit removes references to kingpin.CommandLine, allowing for the
collector package to be used and configured with a custom kingpin (or no
kingpin at all).

The configuration for collectors has been moved to struct fields, which
the kingpin flags populate at flag parse time.

Co-authored-by: Robert Fratto <[email protected]>
Signed-off-by: Marc Tuduri <[email protected]>
@cristiangreco
Copy link
Contributor

@SuperQ would you have bandwidth to consider this PR for review?

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.

2 participants