diff --git a/.chloggen/drosiek-mysql-feature-gate.yaml b/.chloggen/drosiek-mysql-feature-gate.yaml new file mode 100755 index 000000000000..ace1f7fc4d9b --- /dev/null +++ b/.chloggen/drosiek-mysql-feature-gate.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: mysqlreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: rename mysql.commands metric to mysql.prepared_statements + +# One or more tracking issues related to the change +issues: [14138] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: Disable the `receiver.mysqlreceiver.renameCommands` feature gate to temporarily revert this change. diff --git a/receiver/mysqlreceiver/scraper.go b/receiver/mysqlreceiver/scraper.go index e0b9767aaf4b..9b5b64896a5c 100644 --- a/receiver/mysqlreceiver/scraper.go +++ b/receiver/mysqlreceiver/scraper.go @@ -41,7 +41,7 @@ const ( func init() { featuregate.GetRegistry().MustRegisterID( RenameCommands, - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("When enabled, the mysql.commands will be deprecated and additionally emitted as optional mysql.prepared_statements metric"), ) } @@ -68,13 +68,12 @@ func newMySQLScraper( } if !ms.renameCommands { - settings.Logger.Warn(fmt.Sprintf("[WARNING] Metric `mysql.commands` will be deprecated and duplicated as `mysql.prepared_statements` in %s. Metric `mysql.commands` will be removed and `mysql.prepared_statements` will be a default metric in %s. Enable a feature gate `%s` to apply and test the upcoming changes earlier", deprecationVersion, renameVersion, RenameCommands)) + settings.Logger.Warn(fmt.Sprintf("[WARNING] Metric `mysql.commands` is deprecated and duplicated as `mysql.prepared_statements`. Metric `mysql.commands` will be removed and `mysql.prepared_statements` will be a default metric in %s. Disable a feature gate `%s` to keep previous behavior", renameVersion, RenameCommands)) ms.config.Metrics.MysqlPreparedStatements.Enabled = false } else { - ms.mb.DeprecateMetrics() - if ms.config.Metrics.MysqlCommands.Enabled { - settings.Logger.Warn(fmt.Sprintf("[WARNING] Metric `mysql.commands` will be deprecated in %s and removed in %s. Please use `mysql.prepared_statements` instead", deprecationVersion, renameVersion)) + ms.mb.DeprecateMetrics() + settings.Logger.Warn(fmt.Sprintf("[WARNING] Metric `mysql.commands` is deprecated and will be removed in %s. Please use `mysql.prepared_statements` instead", renameVersion)) } if !ms.config.Metrics.MysqlPreparedStatements.Enabled {