File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
21
21
"encoding/hex"
22
22
"net/http"
23
23
24
- "github.com/arduino/arduino-cli/configuration"
25
24
"github.com/arduino/arduino-cli/inventory"
26
25
"github.com/segmentio/stats/v4"
27
26
"github.com/segmentio/stats/v4/prometheus"
@@ -32,7 +31,7 @@ import (
32
31
var serverPattern = "/metrics"
33
32
34
33
// Activate configures and starts the metrics server exposing a Prometheus resource
35
- func Activate (metricPrefix string ) {
34
+ func Activate (metricPrefix , serverAddr string ) {
36
35
// Create a Prometheus default handler
37
36
ph := prometheus .DefaultHandler
38
37
// Create a new stats engine with an engine that prepends the "daemon" prefix to all metrics
@@ -42,8 +41,6 @@ func Activate(metricPrefix string) {
42
41
// Register the handler so it receives metrics from the default engine.
43
42
stats .Register (ph )
44
43
45
- // Configure using viper settings
46
- serverAddr := configuration .Settings .GetString ("metrics.addr" )
47
44
logrus .Infof ("Setting up Prometheus metrics on %s%s" , serverAddr , serverPattern )
48
45
go func () {
49
46
http .Handle (serverPattern , ph )
You can’t perform that action at this time.
0 commit comments