diff --git a/daemon.go b/daemon.go index e7dafff..e539e28 100644 --- a/daemon.go +++ b/daemon.go @@ -146,7 +146,7 @@ func (d *Daemon) reportStats(includeLag bool) { log = log.With(k, v) } - if _, err := d.rt.CW.Client.PutMetricData(ctx, d.rt.CW.Prepare(metrics)); err != nil { + if err := d.rt.CW.Send(ctx, metrics...); err != nil { log.Error("error putting metrics", "error", err) } diff --git a/go.mod b/go.mod index 70b3672..f26a1c1 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/getsentry/sentry-go v0.30.0 github.com/lib/pq v1.10.9 github.com/nyaruka/ezconf v0.3.0 - github.com/nyaruka/gocommon v1.60.2 + github.com/nyaruka/gocommon v1.60.3 github.com/samber/slog-multi v1.2.4 github.com/samber/slog-sentry v1.2.2 github.com/stretchr/testify v1.10.0 diff --git a/go.sum b/go.sum index f76545e..8a964b0 100644 --- a/go.sum +++ b/go.sum @@ -59,8 +59,8 @@ github.com/naoina/toml v0.1.1 h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8= github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nyaruka/ezconf v0.3.0 h1:kGvJqVN8AHowb4HdaHAviJ0Z3yI5Pyekp1WqibFEaGk= github.com/nyaruka/ezconf v0.3.0/go.mod h1:89GUW6EPRNLIxT7lC4LWnjWTgZeQwRoX7lBmc8ralAU= -github.com/nyaruka/gocommon v1.60.2 h1:AvvSSAV70SV49ocNtvjpdb9NlcdiA2OQAL4NYVUcuV0= -github.com/nyaruka/gocommon v1.60.2/go.mod h1:kFJuOq8COneV7ssfK6xgCMJ8gP8fQifLQnNXBnE4YL0= +github.com/nyaruka/gocommon v1.60.3 h1:fPQ9t6NX+mu7JQ7nXefgpBs8paqGvGXq3eA7VscsAVo= +github.com/nyaruka/gocommon v1.60.3/go.mod h1:kFJuOq8COneV7ssfK6xgCMJ8gP8fQifLQnNXBnE4YL0= github.com/nyaruka/librato v1.1.1 h1:0nTYtJLl3Sn7lX3CuHsLf+nXy1k/tGV0OjVxLy3Et4s= github.com/nyaruka/librato v1.1.1/go.mod h1:fme1Fu1PT2qvkaBZyw8WW+SrnFe2qeeCWpvqmAaKAKE= github.com/nyaruka/null/v2 v2.0.3 h1:rdmMRQyVzrOF3Jff/gpU/7BDR9mQX0lcLl4yImsA3kw= diff --git a/indexers/base_test.go b/indexers/base_test.go index 53a8150..1cf4ebe 100644 --- a/indexers/base_test.go +++ b/indexers/base_test.go @@ -23,6 +23,7 @@ import ( func setup(t *testing.T) *runtime.Runtime { cfg := runtime.NewDefaultConfig() + cfg.DeploymentID = "test" cfg.DB = "postgres://indexer_test:temba@localhost:5432/indexer_test?sslmode=disable" cfg.ContactsIndex = "indexer_test"