Export Prometheus telemetry in daemon mode (#573)
* Apply cosmetics * Implement ugly telemetry POC * Added prefix and moved Insrumentation inside the command package * Refactor the telemetry module * Implement configuration via Viper * Add stats flush in case of a not daemonized cli daemon proces * Add repertory to store installation id and secret * Repertory force write * Cosmetics * Use viper config for repertory dir * Add test for repertory file creation * Add testing for telemetry deaemon and repertory * Wait for repertory and kill daemon * Updated pyinvoke to use async feature to test the daemon * Updated daemon test timeout * Cosmetics * Set getDefaultArduinoDataDir as unexported * Cosmetics * Cosmetics * Cosmetics * Lint on repertory module * Set SIGTERM as kill signal in case of win platform to overcome pyinvoke bug * Import platform as a module * Reverse platform if for signal value * Extract pid value * Remove print leftover * Add better error handling in repertory creation * Update docs with old README extract * Remove telemetry.pattern setting from docs * Remove serverPattern config option for telemetry * Upgrade viper to 1.6.2 * Defer stats Increment in compile command and explicit set for success/failure * Fix board list help message * Implement stats flush anyway to leverage module no-op in case of no handler configured * Rename "repertory" module in "inventory" and refactor Sanitize function * Sanitize ExportFile in command/compile * Refactor daemon start fixture to include daemon process cleanup * Use defer function to push success tag correctly updated * Use named return parameters to handle success tagging for a command stat
Showing
... | ... | @@ -17,12 +17,12 @@ require ( |
github.com/fluxio/multierror v0.0.0-20160419044231-9c68d39025e5 // indirect | ||
github.com/fsnotify/fsnotify v1.4.7 | ||
github.com/go-errors/errors v1.0.1 | ||
github.com/gofrs/uuid v3.2.0+incompatible | ||
github.com/golang/protobuf v1.3.3 | ||
github.com/h2non/filetype v1.0.8 // indirect | ||
github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 // indirect | ||
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 // indirect | ||
github.com/juju/testing v0.0.0-20190429233213-dfc56b8c09fc // indirect | ||
github.com/kr/pretty v0.1.0 // indirect | ||
github.com/mattn/go-colorable v0.1.2 | ||
github.com/mattn/go-runewidth v0.0.2 // indirect | ||
github.com/miekg/dns v1.0.5 // indirect | ||
... | ... | @@ -31,11 +31,11 @@ require ( |
github.com/pmylund/sortutil v0.0.0-20120526081524-abeda66eb583 | ||
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 | ||
github.com/schollz/closestmatch v2.1.0+incompatible | ||
github.com/segmentio/stats/v4 v4.5.3 | ||
github.com/sirupsen/logrus v1.4.2 | ||
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect | ||
github.com/spf13/cobra v0.0.5 | ||
github.com/spf13/jwalterweatherman v1.0.0 | ||
github.com/spf13/viper v1.3.2 | ||
github.com/spf13/viper v1.6.2 | ||
github.com/stretchr/testify v1.4.0 | ||
go.bug.st/cleanup v1.0.0 | ||
go.bug.st/downloader v1.1.0 | ||
... | ... | @@ -49,5 +49,5 @@ require ( |
google.golang.org/grpc v1.27.0 | ||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect | ||
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect | ||
gopkg.in/yaml.v2 v2.2.2 | ||
gopkg.in/yaml.v2 v2.2.4 | ||
) |
This diff is collapsed.
inventory/inventory.go
0 → 100644
telemetry/telemetry.go
0 → 100644
test/test_daemon.py
0 → 100644
Please register or sign in to comment