Skip to content

Commit

Permalink
Adding telemetry init
Browse files Browse the repository at this point in the history
  • Loading branch information
ldecheverz-split committed Nov 29, 2023
1 parent 0cd1a69 commit d119f8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ require (
github.com/gin-gonic/gin v1.9.1
github.com/google/uuid v1.3.0
github.com/splitio/gincache v1.0.1
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231107204809-f5ccd6663702
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231115165340-19ae11b6b7d5
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc
github.com/stretchr/testify v1.8.4
go.etcd.io/bbolt v1.3.6
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
)

require (
Expand Down Expand Up @@ -41,7 +42,6 @@ require (
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.13.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUA
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/splitio/gincache v1.0.1 h1:dLYdANY/BqH4KcUMCe/LluLyV5WtuE/LEdQWRE06IXU=
github.com/splitio/gincache v1.0.1/go.mod h1:CcgJDSM9Af75kyBH0724v55URVwMBuSj5x1eCWIOECY=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231107204809-f5ccd6663702 h1:cwtkbzpL53TtVmWyE4o+JuT8KuDImvuZXscdKBR28/0=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231107204809-f5ccd6663702/go.mod h1:PSkBLDXQW7NAhZ7JO1va7QJyTeDvpE7MEDnTdn5evRM=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231115165340-19ae11b6b7d5 h1:tXHXzigms5Umk2HCOv72QqXGVypNSrzpl6E0Mwpxoq4=
github.com/splitio/go-split-commons/v5 v5.0.1-0.20231115165340-19ae11b6b7d5/go.mod h1:PSkBLDXQW7NAhZ7JO1va7QJyTeDvpE7MEDnTdn5evRM=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc h1:14jdJE/rBEYfs1CO8kOQrj/8azszRFU4yw5FQIGpoJg=
github.com/splitio/go-toolkit/v5 v5.3.2-0.20231106173125-49e72b9823dc/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
3 changes: 3 additions & 0 deletions splitio/proxy/initialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func Start(logger logging.LoggerInterface, cfg *pconf.Main) error {
logger.Info("Synchronizer tasks started")
appMonitor.Start()
servicesMonitor.Start()
flagSetsAfterSanitize, _ := flagsets.SanitizeMany(cfg.FlagSetsFilter)
workers.TelemetryRecorder.SynchronizeConfig(
telemetry.InitConfig{
AdvancedConfig: *advanced,
Expand All @@ -175,6 +176,8 @@ func Start(logger logging.LoggerInterface, cfg *pconf.Main) error {
TelemetrySync: int(cfg.Sync.Advanced.InternalMetricsRateMs / 1000),
},
ListenerEnabled: cfg.Integrations.ImpressionListener.Endpoint != "",
FlagSetsTotal: int64(len(cfg.FlagSetsFilter)),
FlagSetsInvalid: int64(len(cfg.FlagSetsFilter) - len(flagSetsAfterSanitize)),
},
time.Since(before).Milliseconds(),
map[string]int64{cfg.Apikey: 1},
Expand Down

0 comments on commit d119f8d

Please sign in to comment.