From 62f5641aa9c8509a4ad3b01471b84b036f231f91 Mon Sep 17 00:00:00 2001 From: Carl Bergquist Date: Wed, 21 Oct 2020 18:36:37 +0200 Subject: [PATCH] Database; Remove database metric feature flag and update changelog (#28438) * adds note about broken feature flag * remove code to enable feature flag Co-authored-by: Marcus Efraimsson --- CHANGELOG.md | 13 +++++++++---- pkg/services/sqlstore/sqlstore.go | 4 ---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e4f294dbb9..dac13ecf490 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,12 +56,17 @@ # 7.2.2 (2020-10-21) ### Features / Enhancements -* **Instrumentation**: Add counters and histograms for database queries. [#28236](https://github.com/grafana/grafana/pull/28236), [@bergquist](https://github.com/bergquist) -* **Instrumentation**: Add histogram for request duration. [#28364](https://github.com/grafana/grafana/pull/28364), [@bergquist](https://github.com/bergquist) -* **Instrumentation**: Adds environment_info metric. [#28355](https://github.com/grafana/grafana/pull/28355), [@bergquist](https://github.com/bergquist) + +**Caution:** Please do not use/enable the `database_metrics` feature flag. It will corrupt MySQL database tables. See [#28440](https://github.com/grafana/grafana/issues/28440) for more information. + +~~**Instrumentation**: Add counters and histograms for database queries. [#28236](https://github.com/grafana/grafana/pull/28236), [@bergquist](https://github.com/bergquist)~~ + +- **Instrumentation**: Add histogram for request duration. [#28364](https://github.com/grafana/grafana/pull/28364), [@bergquist](https://github.com/bergquist) +- **Instrumentation**: Adds environment_info metric. [#28355](https://github.com/grafana/grafana/pull/28355), [@bergquist](https://github.com/bergquist) ### Bug Fixes -* **CloudWatch**: Fix custom metrics. [#28391](https://github.com/grafana/grafana/pull/28391), [@aknuds1](https://github.com/aknuds1) + +- **CloudWatch**: Fix custom metrics. [#28391](https://github.com/grafana/grafana/pull/28391), [@aknuds1](https://github.com/aknuds1) # 7.2.1 (2020-10-08) diff --git a/pkg/services/sqlstore/sqlstore.go b/pkg/services/sqlstore/sqlstore.go index a5646e246fb..dde259f4a9b 100644 --- a/pkg/services/sqlstore/sqlstore.go +++ b/pkg/services/sqlstore/sqlstore.go @@ -238,10 +238,6 @@ func (ss *SqlStore) getEngine() (*xorm.Engine, error) { return nil, err } - if ss.Cfg.IsDatabaseMetricsEnabled() { - ss.dbCfg.Type = WrapDatabaseDriverWithHooks(ss.dbCfg.Type) - } - sqlog.Info("Connecting to DB", "dbtype", ss.dbCfg.Type) if ss.dbCfg.Type == migrator.SQLITE && strings.HasPrefix(connectionString, "file:") { exists, err := fs.Exists(ss.dbCfg.Path)