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
@marctc marctc force-pushed the refactor_collector branch from 0debdf3 to 364b9c4 Compare October 5, 2023 12:59
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 3 times, most recently from 7bc7b9d to 1f5a899 Compare October 14, 2024 13:56
@cristiangreco
Copy link
Contributor

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

cristiangreco added a commit to grafana/alloy that referenced this pull request Nov 7, 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 Nov 7, 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 Nov 7, 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 Nov 7, 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 Nov 8, 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 Nov 26, 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 Nov 27, 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 Nov 28, 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 Nov 28, 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 Nov 28, 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 Nov 28, 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 Nov 28, 2024
From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.
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 <robertfratto@gmail.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
wildum pushed a commit to grafana/alloy that referenced this pull request Nov 29, 2024
* Update mysqld_exporter to v0.16.0

From grafana/mysqld_exporter branch `refactor_collector`, including
changes in prometheus/mysqld_exporter#774.

* update up to 2ef168bf6
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