Skip to content

Commit

Permalink
Merge pull request #133 from mimiro-io/chore/statsd-upgrade
Browse files Browse the repository at this point in the history
upgrade datadog statsd lib to v5
  • Loading branch information
gra-moore authored Apr 22, 2022
2 parents 3ab8fb2 + 38fb9db commit 631a5af
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 34 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/mimiro-io/datahub
go 1.17

require (
github.com/DataDog/datadog-go v4.5.0+incompatible
github.com/DataDog/datadog-go/v5 v5.1.0
github.com/PaddleHQ/go-aws-ssm v0.8.0
github.com/aws/aws-sdk-go v1.38.4
github.com/bamzi/jobrunner v1.0.0
Expand All @@ -27,7 +27,7 @@ require (
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
Expand Down
14 changes: 6 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-go v3.7.1+incompatible h1:HmA9qHVrHIAqpSvoCYJ+c6qst0lgqEhNW6/KwfkHbS8=
github.com/DataDog/datadog-go v3.7.1+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/DataDog/datadog-go v4.5.0+incompatible h1:MyyuIz5LVAI3Im+0F/tfo64ETyH4sNVynZ29yOiHm50=
github.com/DataDog/datadog-go v4.5.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk=
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
github.com/DataDog/datadog-go/v5 v5.1.0 h1:Zmq3tCk9+Tdq8Du73M71Zo6Dyx+cEo9QkCSCqQlHFaQ=
github.com/DataDog/datadog-go/v5 v5.1.0/go.mod h1:KhiYb2Badlv9/rofz+OznKoEF5XKTonWyhx5K83AP8E=
github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU=
github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=
github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
Expand Down Expand Up @@ -258,7 +259,6 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.12.3 h1:G5AfA94pHPysR56qqrkO2pxEexdDzrpFJ6yt/VqWxVU=
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
Expand Down Expand Up @@ -329,7 +329,7 @@ github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
Expand Down Expand Up @@ -519,7 +519,6 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cO
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand All @@ -532,7 +531,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
2 changes: 1 addition & 1 deletion internal/conf/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ package conf

import (
"context"
"github.com/DataDog/datadog-go/v5/statsd"
"math"
"runtime"
"runtime/metrics"
"strings"
"time"

"github.com/DataDog/datadog-go/statsd"
"go.uber.org/fx"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/content/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package content
import (
"encoding/json"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/mimiro-io/datahub/internal/conf"
"github.com/mimiro-io/datahub/internal/server"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/content/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/franela/goblin"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/mimiro-io/datahub/internal/conf"
"github.com/mimiro-io/datahub/internal/server"
"go.uber.org/fx/fxtest"
Expand Down
2 changes: 1 addition & 1 deletion internal/jobs/raffle.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"sync"
"time"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/jobs/raffle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/franela/goblin"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/jobs/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package jobs

import (
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/bamzi/jobrunner"
"github.com/mimiro-io/datahub/internal/conf"
"github.com/mimiro-io/datahub/internal/security"
Expand Down
12 changes: 11 additions & 1 deletion internal/jobs/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"github.com/mimiro-io/datahub/internal/conf"
"go.uber.org/fx/fxtest"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/labstack/echo/v4"
"github.com/mimiro-io/datahub/internal/server"
"go.uber.org/zap"
Expand Down Expand Up @@ -1053,6 +1053,16 @@ type StatsDRecorder struct {
CountCallback func(map[string]interface{})
}

func (r *StatsDRecorder) IsClosed() bool {
//TODO implement me
panic("implement me")
}

func (r *StatsDRecorder) GetTelemetry() statsd.Telemetry {
//TODO implement me
panic("implement me")
}

func (r *StatsDRecorder) Reset() {
r.Gauges = make(map[string]float64)
r.Counts = make(map[string]int64)
Expand Down
2 changes: 1 addition & 1 deletion internal/jobs/source/dataset_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package source_test
import (
"context"
"fmt"
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/franela/goblin"
"github.com/mimiro-io/datahub/internal/conf"
"github.com/mimiro-io/datahub/internal/jobs/source"
Expand Down
2 changes: 1 addition & 1 deletion internal/jobs/source/multi_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/DataDog/datadog-go/v5/statsd"
"os"
"testing"

"github.com/DataDog/datadog-go/statsd"
"github.com/franela/goblin"
"go.uber.org/fx/fxtest"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/jobs/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"strings"
"time"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/gofrs/uuid"

"github.com/dop251/goja"
Expand Down
2 changes: 1 addition & 1 deletion internal/jobs/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package jobs

import (
"encoding/base64"
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"strings"
"testing"

Expand Down
2 changes: 1 addition & 1 deletion internal/security/login_provider_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package security

import (
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/franela/goblin"
"github.com/mimiro-io/datahub/internal/conf"
"github.com/mimiro-io/datahub/internal/server"
Expand Down
2 changes: 1 addition & 1 deletion internal/security/manager_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package security

import (
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/franela/goblin"
"github.com/mimiro-io/datahub/internal/conf"
"github.com/mimiro-io/datahub/internal/server"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/backup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"os"
"testing"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/mimiro-io/datahub/internal/conf"
"go.uber.org/fx/fxtest"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/dataset_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package server

import (
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"go.uber.org/zap"
"os"
"strconv"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/dataset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package server
import (
"context"
"fmt"
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/mimiro-io/datahub/internal/conf"
"go.uber.org/fx/fxtest"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/dsmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"
"time"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/mimiro-io/datahub/internal/conf"
"go.uber.org/fx/fxtest"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (

"github.com/mustafaturan/bus"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/mimiro-io/datahub/internal/conf"
"go.uber.org/fx/fxtest"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/garbagecollector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package server
import (
"context"
"fmt"
"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/franela/goblin"
"github.com/mimiro-io/datahub/internal/conf"
"go.uber.org/fx/fxtest"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"sync"
"time"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/dgraph-io/badger/v3"
"go.uber.org/fx"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/franela/goblin"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"go.uber.org/fx/fxtest"

"github.com/mimiro-io/datahub/internal/conf"
Expand Down
2 changes: 1 addition & 1 deletion internal/server/streamparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"strings"
"testing"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"go.uber.org/zap"

"github.com/franela/goblin"
Expand Down
2 changes: 1 addition & 1 deletion internal/web/middlewares/loggerfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strings"
"time"

"github.com/DataDog/datadog-go/statsd"
"github.com/DataDog/datadog-go/v5/statsd"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion internal/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ package web

import (
"context"
"github.com/DataDog/datadog-go/v5/statsd"
"html/template"
"io"
"net/http"

"github.com/DataDog/datadog-go/statsd"
"github.com/labstack/echo/v4"
"github.com/mimiro-io/datahub/internal/conf"
"github.com/mimiro-io/datahub/internal/content"
Expand Down

0 comments on commit 631a5af

Please sign in to comment.