Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
52 additions
and 35 deletions.
- +2 −2 cli/config/validate.go
- +4 −4 cli/daemon/daemon.go
- +3 −3 commands/compile/compile.go
- +2 −2 configuration/configuration_test.go
- +3 −3 configuration/defaults.go
- +17 −0 docs/UPGRADING.md
- +3 −3 docs/configuration.md
- +3 −3 docs/getting-started.md
- +5 −5 telemetry/telemetry.go → metrics/metrics.go
- +8 −8 test/test_config.py
- +2 −2 test/test_daemon.py
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -13,7 +13,7 @@ | ||
// Arduino software without disclosing the source code of your own applications. | ||
// To purchase a commercial license, send an email to [email protected]. | ||
|
||
package metrics | ||
|
||
import ( | ||
"crypto/hmac" | ||
@@ -28,10 +28,10 @@ import ( | ||
"github.com/sirupsen/logrus" | ||
) | ||
|
||
// serverPattern is the metrics endpoint resource path for consume metrics | ||
var serverPattern = "/metrics" | ||
|
||
// Activate configures and starts the metrics server exposing a Prometheus resource | ||
func Activate(metricPrefix string) { | ||
// Create a Prometheus default handler | ||
ph := prometheus.DefaultHandler | ||
@@ -43,8 +43,8 @@ func Activate(metricPrefix string) { | ||
stats.Register(ph) | ||
|
||
// Configure using viper settings | ||
serverAddr := configuration.Settings.GetString("metrics.addr") | ||
logrus.Infof("Setting up Prometheus metrics on %s%s", serverAddr, serverPattern) | ||
go func() { | ||
http.Handle(serverPattern, ph) | ||
logrus.Error(http.ListenAndServe(serverAddr, nil)) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters