convert old metrics to prom metrics

This commit is contained in:
bergquist
2017-09-06 11:23:52 +02:00
committed by Carl Bergquist
parent 788f677ed7
commit 2de94d6548
37 changed files with 283 additions and 489 deletions

View File

@@ -75,7 +75,7 @@ func SaveDashboard(cmd *m.SaveDashboardCommand) error {
if dash.Id == 0 {
dash.Version = 1
metrics.M_Models_Dashboard_Insert.Inc(1)
metrics.M_Api_Dashboard_Insert.Inc()
dash.Data.Set("version", dash.Version)
affectedRows, err = sess.Insert(dash)
} else {

View File

@@ -20,7 +20,7 @@ func init() {
}
func GetDataSourceById(query *m.GetDataSourceByIdQuery) error {
metrics.M_DB_DataSource_QueryById.Inc(1)
metrics.M_DB_DataSource_QueryById.Inc()
datasource := m.DataSource{OrgId: query.OrgId, Id: query.Id}
has, err := x.Get(&datasource)