-
Notifications
You must be signed in to change notification settings - Fork 764
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
Fix shared metrics between requests #722
Merged
Merged
+32
−70
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: qizhicheng <qizhicheng@douban.com>
LeoQuote
force-pushed
the
delete_shared_metrics
branch
from
April 10, 2023 11:22
727881d
to
5632e89
Compare
SuperQ
requested changes
Apr 10, 2023
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.
Thanks, most of this makes sense. I think we should move all the Prometheus metric descriptors to package level vars to reduce the Go GC churn.
SuperQ
reviewed
Apr 10, 2023
Signed-off-by: qizhicheng <qizhicheng@douban.com>
SuperQ
reviewed
Apr 11, 2023
Signed-off-by: qizhicheng <qizhicheng@douban.com>
SuperQ
approved these changes
Apr 11, 2023
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.
Thanks!
SuperQ
changed the title
delete shared metrics between requests
Fix shared metrics between requests
Apr 11, 2023
Merged
SuperQ
added a commit
that referenced
this pull request
Apr 14, 2023
BREAKING CHANGES: The exporter no longer supports the monolithic `DATA_SOURCE_NAME` environment variable. To configure connections to MySQL you can either use a `my.cnf` style config file or command line arguments. For example: export MYSQLD_EXPORTER_PASSWORD=secret mysqld_exporter --mysqld.address=localhost:3306 --mysqld.username=exporter We have also dropped some internal scrape metrics: * `mysql_exporter_scrapes_total` * `mysql_exporter_scrape_errors_total` * `mysql_last_scrape_failed` Changes: * [CHANGE] Allow tlsCfg.InsecureSkipVerify outside of mTLS #631 * [CHANGE] Update to exporter-toolkit v0.8.1 #677 * [CHANGE] Fix shared metrics between requests #722 * [FEATURE] Add support for collecting metrics from sys.user_summary #628 * [FEATURE] Support for multi-target mysqld probes #651 * [FEATURE] Add MySQL TLS configurations #718 * [BUGFIX] Fix infoSchemaInnodbMetricsEnabledColumnQuery #687 Signed-off-by: SuperQ <superq@gmail.com>
SuperQ
added a commit
that referenced
this pull request
Apr 14, 2023
BREAKING CHANGES: The exporter no longer supports the monolithic `DATA_SOURCE_NAME` environment variable. To configure connections to MySQL you can either use a `my.cnf` style config file or command line arguments. For example: export MYSQLD_EXPORTER_PASSWORD=secret mysqld_exporter --mysqld.address=localhost:3306 --mysqld.username=exporter We have also dropped some internal scrape metrics: * `mysql_exporter_scrapes_total` * `mysql_exporter_scrape_errors_total` * `mysql_last_scrape_failed` Changes: * [CHANGE] Allow tlsCfg.InsecureSkipVerify outside of mTLS #631 * [CHANGE] Update to exporter-toolkit v0.8.1 #677 * [CHANGE] Fix shared metrics between requests #722 * [FEATURE] Add support for collecting metrics from sys.user_summary #628 * [FEATURE] Support for multi-target mysqld probes #651 * [FEATURE] Add MySQL TLS configurations #718 * [BUGFIX] Fix infoSchemaInnodbMetricsEnabledColumnQuery #687 Signed-off-by: SuperQ <superq@gmail.com>
SuperQ
added a commit
that referenced
this pull request
Jun 19, 2023
* [CHANGE] Allow `tlsCfg.InsecureSkipVerify` outside of mTLS #631 * [CHANGE] Update to exporter-toolkit v0.8.1 #677 * [CHANGE] Fix shared metrics between requests #722 * [FEATURE] Add support for collecting metrics from `sys.user_summary` #628 * [FEATURE] Support for multi-target mysqld probes #651 * [FEATURE] Add MySQL TLS configurations #718 * [ENHANCEMENT] Add UNIX domain socket support for multi-target scraping #707 * [BUGFIX] Fix `infoSchemaInnodbMetricsEnabledColumnQuery` #687 * [BUGFIX] Allow empty passwords #742 Signed-off-by: SuperQ <superq@gmail.com>
Merged
SuperQ
added a commit
that referenced
this pull request
Jun 22, 2023
* [CHANGE] Allow `tlsCfg.InsecureSkipVerify` outside of mTLS #631 * [CHANGE] Update to exporter-toolkit v0.8.1 #677 * [CHANGE] Fix shared metrics between requests #722 * [FEATURE] Add support for collecting metrics from `sys.user_summary` #628 * [FEATURE] Support for multi-target mysqld probes #651 * [FEATURE] Add MySQL TLS configurations #718 * [ENHANCEMENT] Add UNIX domain socket support for multi-target scraping #707 * [BUGFIX] Fix `infoSchemaInnodbMetricsEnabledColumnQuery` #687 * [BUGFIX] Allow empty passwords #742 Signed-off-by: SuperQ <superq@gmail.com>
SuperQ
added a commit
that referenced
this pull request
Jun 22, 2023
BREAKING CHANGES: The exporter no longer supports the monolithic `DATA_SOURCE_NAME` environment variable. To configure connections to MySQL you can either use a `my.cnf` style config file or command line arguments. For example: export MYSQLD_EXPORTER_PASSWORD=secret mysqld_exporter --mysqld.address=localhost:3306 --mysqld.username=exporter We have also dropped some internal scrape metrics: - `mysql_exporter_scrapes_total` - `mysql_exporter_scrape_errors_total` - `mysql_last_scrape_failed` The default client configuration file is now `.my.cnf` in the process working directory. Use `--config.my-cnf="$HOME/.my.cnf"` to retain the previous default. Changes: * [CHANGE] Allow `tlsCfg.InsecureSkipVerify` outside of mTLS #631 * [CHANGE] Update to exporter-toolkit v0.8.1 #677 * [CHANGE] Fix shared metrics between requests #722 * [CHANGE] Allow empty passwords #742 * [CHANGE] Don't use HOME env in the my-cnf config path. #745 * [FEATURE] Add support for collecting metrics from `sys.user_summary` #628 * [FEATURE] Support for multi-target mysqld probes #651 * [FEATURE] Add MySQL TLS configurations #718 * [FEATURE] Add config reload via /-/reload #734 * [ENHANCEMENT] Add UNIX domain socket support for multi-target scraping #707 * [ENHANCEMENT] Use `STRAIGHT_JOIN` in infoSchemaAutoIncrementQuery #726 * [BUGFIX] Fix `infoSchemaInnodbMetricsEnabledColumnQuery` #687 * [BUGFIX] Allow empty passwords #742 Signed-off-by: SuperQ <superq@gmail.com>
SuperQ
added a commit
that referenced
this pull request
Jun 24, 2023
BREAKING CHANGES: The exporter no longer supports the monolithic `DATA_SOURCE_NAME` environment variable. To configure connections to MySQL you can either use a `my.cnf` style config file or command line arguments. For example: export MYSQLD_EXPORTER_PASSWORD=secret mysqld_exporter --mysqld.address=localhost:3306 --mysqld.username=exporter We have also dropped some internal scrape metrics: - `mysql_exporter_scrapes_total` - `mysql_exporter_scrape_errors_total` - `mysql_last_scrape_failed` The default client configuration file is now `.my.cnf` in the process working directory. Use `--config.my-cnf="$HOME/.my.cnf"` to retain the previous default. Changes: * [CHANGE] Allow `tlsCfg.InsecureSkipVerify` outside of mTLS #631 * [CHANGE] Update to exporter-toolkit v0.8.1 #677 * [CHANGE] Fix shared metrics between requests #722 * [CHANGE] Allow empty passwords #742 * [CHANGE] Don't use HOME env in the my-cnf config path. #745 * [FEATURE] Add support for collecting metrics from `sys.user_summary` #628 * [FEATURE] Support for multi-target mysqld probes #651 * [FEATURE] Add MySQL TLS configurations #718 * [FEATURE] Add config reload via /-/reload #734 * [ENHANCEMENT] Add UNIX domain socket support for multi-target scraping #707 * [ENHANCEMENT] Use `STRAIGHT_JOIN` in infoSchemaAutoIncrementQuery #726 * [BUGFIX] Fix `infoSchemaInnodbMetricsEnabledColumnQuery` #687 * [BUGFIX] Allow empty passwords #742 Signed-off-by: SuperQ <superq@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking changes
dropped metrics
new metrics
metrics isolated between requests
Why is this neccessary
We are using mysqld_exporter in
multi-target
method, which means one exporter for multiple mysql instance, the crucial metricmysql_up
must be isolated between requests, or there will be misunderstandings, some mysql instance would shown as down while in fact it is not.all shared metrics are dropped especially
mysql_exporter_scrapes_total
andmysql_exporter_scrape_errors_total
, the metrics are useless since prometheus can record almost everything, including scrape fail for each collector.mysql_last_scrape_failed
is covered bymysql_exporter_collector_success
so it is also dropped.fix #713