diff --git a/pkg/api/admin_users.go b/pkg/api/admin_users.go index efc760d2b51..c16c2f126f8 100644 --- a/pkg/api/admin_users.go +++ b/pkg/api/admin_users.go @@ -3,7 +3,7 @@ package api import ( "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/bus" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/util" ) diff --git a/pkg/api/dashboard.go b/pkg/api/dashboard.go index 20d717ef8fa..f1ad935e621 100644 --- a/pkg/api/dashboard.go +++ b/pkg/api/dashboard.go @@ -13,8 +13,8 @@ import ( "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/components/dashdiffs" "github.com/grafana/grafana/pkg/components/simplejson" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" - "github.com/grafana/grafana/pkg/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/plugins" "github.com/grafana/grafana/pkg/services/guardian" diff --git a/pkg/api/dashboard_snapshot.go b/pkg/api/dashboard_snapshot.go index ca7e78a58cd..ba4a09f6f01 100644 --- a/pkg/api/dashboard_snapshot.go +++ b/pkg/api/dashboard_snapshot.go @@ -10,7 +10,7 @@ import ( "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/components/simplejson" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/services/guardian" "github.com/grafana/grafana/pkg/setting" diff --git a/pkg/api/dataproxy.go b/pkg/api/dataproxy.go index 5cde0efd0b4..54a744fccdc 100644 --- a/pkg/api/dataproxy.go +++ b/pkg/api/dataproxy.go @@ -2,7 +2,7 @@ package api import ( "github.com/grafana/grafana/pkg/api/pluginproxy" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/plugins" ) diff --git a/pkg/api/login.go b/pkg/api/login.go index 106a48dd6a8..1445463852b 100644 --- a/pkg/api/login.go +++ b/pkg/api/login.go @@ -7,9 +7,9 @@ import ( "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/bus" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" "github.com/grafana/grafana/pkg/login" - "github.com/grafana/grafana/pkg/metrics" "github.com/grafana/grafana/pkg/middleware" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/setting" diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go index 87a8ecc876f..7d9537b4790 100644 --- a/pkg/api/login_oauth.go +++ b/pkg/api/login_oauth.go @@ -16,9 +16,9 @@ import ( "golang.org/x/oauth2" "github.com/grafana/grafana/pkg/bus" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" "github.com/grafana/grafana/pkg/login" - "github.com/grafana/grafana/pkg/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/social" diff --git a/pkg/api/org.go b/pkg/api/org.go index 8d0d48bad13..07122ecd6ca 100644 --- a/pkg/api/org.go +++ b/pkg/api/org.go @@ -3,7 +3,7 @@ package api import ( "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/bus" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/util" diff --git a/pkg/api/org_invite.go b/pkg/api/org_invite.go index 835b03a2cc9..86067cd7721 100644 --- a/pkg/api/org_invite.go +++ b/pkg/api/org_invite.go @@ -6,7 +6,7 @@ import ( "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/events" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/util" diff --git a/pkg/api/search.go b/pkg/api/search.go index 8c2b708d5a2..22709bf8a6d 100644 --- a/pkg/api/search.go +++ b/pkg/api/search.go @@ -4,7 +4,7 @@ import ( "strconv" "github.com/grafana/grafana/pkg/bus" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/services/search" ) diff --git a/pkg/api/signup.go b/pkg/api/signup.go index fe577dd9ef9..c572ccc09f7 100644 --- a/pkg/api/signup.go +++ b/pkg/api/signup.go @@ -4,7 +4,7 @@ import ( "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/events" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/util" diff --git a/pkg/cmd/grafana-server/main.go b/pkg/cmd/grafana-server/main.go index d371d4e91da..825d48e0076 100644 --- a/pkg/cmd/grafana-server/main.go +++ b/pkg/cmd/grafana-server/main.go @@ -14,8 +14,8 @@ import ( "time" "github.com/grafana/grafana/pkg/extensions" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" - "github.com/grafana/grafana/pkg/metrics" _ "github.com/grafana/grafana/pkg/services/alerting/conditions" _ "github.com/grafana/grafana/pkg/services/alerting/notifiers" "github.com/grafana/grafana/pkg/setting" diff --git a/pkg/cmd/grafana-server/server.go b/pkg/cmd/grafana-server/server.go index f663e6be895..a1db5cd4b4c 100644 --- a/pkg/cmd/grafana-server/server.go +++ b/pkg/cmd/grafana-server/server.go @@ -28,8 +28,8 @@ import ( // self registering services _ "github.com/grafana/grafana/pkg/extensions" + _ "github.com/grafana/grafana/pkg/infra/metrics" _ "github.com/grafana/grafana/pkg/infra/serverlock" - _ "github.com/grafana/grafana/pkg/metrics" _ "github.com/grafana/grafana/pkg/plugins" _ "github.com/grafana/grafana/pkg/services/alerting" _ "github.com/grafana/grafana/pkg/services/auth" diff --git a/pkg/metrics/graphitebridge/graphite.go b/pkg/infra/metrics/graphitebridge/graphite.go similarity index 100% rename from pkg/metrics/graphitebridge/graphite.go rename to pkg/infra/metrics/graphitebridge/graphite.go diff --git a/pkg/metrics/graphitebridge/graphite_test.go b/pkg/infra/metrics/graphitebridge/graphite_test.go similarity index 100% rename from pkg/metrics/graphitebridge/graphite_test.go rename to pkg/infra/metrics/graphitebridge/graphite_test.go diff --git a/pkg/metrics/metrics.go b/pkg/infra/metrics/metrics.go similarity index 100% rename from pkg/metrics/metrics.go rename to pkg/infra/metrics/metrics.go diff --git a/pkg/metrics/service.go b/pkg/infra/metrics/service.go similarity index 94% rename from pkg/metrics/service.go rename to pkg/infra/metrics/service.go index 44b83187cac..ac1d934e375 100644 --- a/pkg/metrics/service.go +++ b/pkg/infra/metrics/service.go @@ -3,8 +3,8 @@ package metrics import ( "context" + "github.com/grafana/grafana/pkg/infra/metrics/graphitebridge" "github.com/grafana/grafana/pkg/log" - "github.com/grafana/grafana/pkg/metrics/graphitebridge" "github.com/grafana/grafana/pkg/registry" "github.com/grafana/grafana/pkg/setting" ) diff --git a/pkg/metrics/settings.go b/pkg/infra/metrics/settings.go similarity index 96% rename from pkg/metrics/settings.go rename to pkg/infra/metrics/settings.go index 048e4134690..9b4ea4607da 100644 --- a/pkg/metrics/settings.go +++ b/pkg/infra/metrics/settings.go @@ -5,7 +5,7 @@ import ( "strings" "time" - "github.com/grafana/grafana/pkg/metrics/graphitebridge" + "github.com/grafana/grafana/pkg/infra/metrics/graphitebridge" "github.com/grafana/grafana/pkg/setting" "github.com/prometheus/client_golang/prometheus" ) diff --git a/pkg/infra/usagestats/usage_stats.go b/pkg/infra/usagestats/usage_stats.go index 9d7501b7765..77951d1c899 100644 --- a/pkg/infra/usagestats/usage_stats.go +++ b/pkg/infra/usagestats/usage_stats.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/plugins" "github.com/grafana/grafana/pkg/setting" diff --git a/pkg/middleware/request_metrics.go b/pkg/middleware/request_metrics.go index f2d71c0a0fe..4ed2c070f84 100644 --- a/pkg/middleware/request_metrics.go +++ b/pkg/middleware/request_metrics.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" "gopkg.in/macaron.v1" ) diff --git a/pkg/services/alerting/eval_handler.go b/pkg/services/alerting/eval_handler.go index aa24efa77cd..097f4bcb2b6 100644 --- a/pkg/services/alerting/eval_handler.go +++ b/pkg/services/alerting/eval_handler.go @@ -5,8 +5,8 @@ import ( "strings" "time" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" - "github.com/grafana/grafana/pkg/metrics" ) type DefaultEvalHandler struct { diff --git a/pkg/services/alerting/notifier.go b/pkg/services/alerting/notifier.go index 59d459f122e..2ef5ebbade3 100644 --- a/pkg/services/alerting/notifier.go +++ b/pkg/services/alerting/notifier.go @@ -7,8 +7,8 @@ import ( "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/components/imguploader" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" - "github.com/grafana/grafana/pkg/metrics" "github.com/grafana/grafana/pkg/services/rendering" "github.com/grafana/grafana/pkg/setting" diff --git a/pkg/services/alerting/reader.go b/pkg/services/alerting/reader.go index 2cdbc57b41d..d9f20a21c8e 100644 --- a/pkg/services/alerting/reader.go +++ b/pkg/services/alerting/reader.go @@ -5,8 +5,8 @@ import ( "time" "github.com/grafana/grafana/pkg/bus" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" - "github.com/grafana/grafana/pkg/metrics" m "github.com/grafana/grafana/pkg/models" ) diff --git a/pkg/services/alerting/result_handler.go b/pkg/services/alerting/result_handler.go index ce12a8a6b96..c8e9e2dc25c 100644 --- a/pkg/services/alerting/result_handler.go +++ b/pkg/services/alerting/result_handler.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/components/simplejson" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/log" - "github.com/grafana/grafana/pkg/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/services/annotations" "github.com/grafana/grafana/pkg/services/rendering" diff --git a/pkg/services/sqlstore/dashboard.go b/pkg/services/sqlstore/dashboard.go index 7ebdbfa65e7..8e1f69d1f6a 100644 --- a/pkg/services/sqlstore/dashboard.go +++ b/pkg/services/sqlstore/dashboard.go @@ -5,7 +5,7 @@ import ( "time" "github.com/grafana/grafana/pkg/bus" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/services/search" "github.com/grafana/grafana/pkg/util" diff --git a/pkg/services/sqlstore/datasource.go b/pkg/services/sqlstore/datasource.go index ccab1106880..1b69cce8c99 100644 --- a/pkg/services/sqlstore/datasource.go +++ b/pkg/services/sqlstore/datasource.go @@ -7,7 +7,7 @@ import ( "github.com/grafana/grafana/pkg/bus" "github.com/grafana/grafana/pkg/components/securejsondata" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" m "github.com/grafana/grafana/pkg/models" ) diff --git a/pkg/tsdb/cloudwatch/cloudwatch.go b/pkg/tsdb/cloudwatch/cloudwatch.go index 8d67fe7db8c..278025db75a 100644 --- a/pkg/tsdb/cloudwatch/cloudwatch.go +++ b/pkg/tsdb/cloudwatch/cloudwatch.go @@ -24,7 +24,7 @@ import ( "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/resourcegroupstaggingapiiface" "github.com/grafana/grafana/pkg/components/null" "github.com/grafana/grafana/pkg/components/simplejson" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" ) type CloudWatchExecutor struct { diff --git a/pkg/tsdb/cloudwatch/metric_find_query.go b/pkg/tsdb/cloudwatch/metric_find_query.go index ddda26dfd24..cb95d39d82d 100644 --- a/pkg/tsdb/cloudwatch/metric_find_query.go +++ b/pkg/tsdb/cloudwatch/metric_find_query.go @@ -17,7 +17,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi" "github.com/grafana/grafana/pkg/components/simplejson" - "github.com/grafana/grafana/pkg/metrics" + "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/tsdb" )