Use a different metric name for new config CRUD APIs

Also, make sure to register the metrics with the same prometheus registerer
as the http server, so that metrics will show up.
This commit is contained in:
beejeebus
2026-01-07 14:28:31 -05:00
parent 00b89b0d29
commit 4518add556
5 changed files with 28 additions and 14 deletions
+1 -1
View File
@@ -387,7 +387,7 @@ func ProvideHTTPServer(opts ServerOptions, cfg *setting.Cfg, routeRegister routi
Namespace: "grafana",
Name: "ds_config_handler_requests_duration_seconds",
Help: "Duration of requests handled by datasource configuration handlers",
}, []string{"code_path", "handler"}),
}, []string{"handler"}),
}
promRegister.MustRegister(hs.htmlHandlerRequestsDuration)