Skip to content

Commit

Permalink
Downgrade gostatsd (#3840)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Plourde committed Jun 10, 2020
1 parent e2faeb2 commit 7ed921d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 294 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ hash, in place of the cleartext password
- `sensu-agent`'s default log level is now `info` instead of `warn`.
- `sensuctl command exec` now spawns the plugin directly instead of going
through a sub-shell.
- Upgrade gostatsd to 20.3.2.

### Fixed
- The password verification logic when running `sensuctl user change-password`
Expand Down
11 changes: 9 additions & 2 deletions agent/statsd_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/sensu/sensu-go/types"
"github.com/sirupsen/logrus"
"github.com/spf13/viper"
"golang.org/x/time/rate"
)

// GetMetricsAddr gets the metrics address of the statsd server.
Expand Down Expand Up @@ -52,6 +53,7 @@ func NewStatsdServer(a *Agent) *statsd.Server {
func NewServer() *statsd.Server {
return &statsd.Server{
Backends: []gostatsd.Backend{},
Limiter: rate.NewLimiter(statsd.DefaultMaxCloudRequests, statsd.DefaultBurstCloudRequests),
InternalTags: statsd.DefaultInternalTags,
InternalNamespace: statsd.DefaultInternalNamespace,
DefaultTags: statsd.DefaultTags,
Expand All @@ -69,8 +71,13 @@ func NewServer() *statsd.Server {
ConnPerReader: statsd.DefaultConnPerReader,
HeartbeatEnabled: statsd.DefaultHeartbeatEnabled,
ReceiveBatchSize: statsd.DefaultReceiveBatchSize,
ServerMode: statsd.DefaultServerMode,
Viper: viper.New(),
CacheOptions: statsd.CacheOptions{
CacheRefreshPeriod: statsd.DefaultCacheRefreshPeriod,
CacheEvictAfterIdlePeriod: statsd.DefaultCacheEvictAfterIdlePeriod,
CacheTTL: statsd.DefaultCacheTTL,
CacheNegativeTTL: statsd.DefaultCacheNegativeTTL,
},
Viper: viper.New(),
}
}

Expand Down
22 changes: 16 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/NYTimes/gziphandler v0.0.0-20180227021810-5032c8878b9d
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f // indirect
github.com/atlassian/gostatsd v0.0.0-20200415072949-40856b5b2569
github.com/ash2k/stager v0.0.0-20170622123058-6e9c7b0eacd4 // indirect
github.com/atlassian/gostatsd v0.0.0-20180514010436-af796620006e
github.com/coreos/bbolt v1.3.3 // indirect
github.com/coreos/etcd v3.3.17+incompatible
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
Expand All @@ -39,7 +40,14 @@ require (
github.com/graphql-go/graphql v0.7.9-0.20191125031726-2e2b648ecbe4
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.11.3 // indirect
github.com/gxed/GoEndian v0.0.0-20160916112711-0f5c6873267e // indirect
github.com/gxed/eventfd v0.0.0-20160916113412-80a92cca79a8 // indirect
github.com/hashicorp/go-version v1.2.0
github.com/ipfs/go-log v1.0.4 // indirect
github.com/jbenet/go-reuseport v0.0.0-20180416043609-15a1cd37f050 // indirect
github.com/libp2p/go-reuseport v0.0.0-20180416043609-15a1cd37f050 // indirect
github.com/libp2p/go-sockaddr v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-runewidth v0.0.2 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
github.com/mholt/archiver/v3 v3.3.1-0.20191129193105-44285f7ed244
Expand All @@ -54,24 +62,26 @@ require (
github.com/sensu/sensu-go/api/core/v2 v2.0.0
github.com/sensu/sensu-go/types v0.1.0
github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd // indirect
github.com/sirupsen/logrus v1.6.0
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.6.2
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.6.0
github.com/willf/pad v0.0.0-20160331131008-b3d780601022
go.etcd.io/bbolt v1.3.2
go.uber.org/multierr v1.2.0 // indirect
go.etcd.io/bbolt v1.3.4
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/sys v0.0.0-20191113165036-4c7a9d0fe056
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980
golang.org/x/text v0.3.2 // indirect
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
golang.org/x/tools v0.0.0-20200207224406-61798d64f025 // indirect
google.golang.org/genproto v0.0.0-20191009194640-548a555dbc03 // indirect
google.golang.org/grpc v1.24.0
gopkg.in/AlecAivazis/survey.v1 v1.4.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/h2non/filetype.v1 v1.0.3
gopkg.in/yaml.v2 v2.3.0
gotest.tools v2.2.0+incompatible // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
Loading

0 comments on commit 7ed921d

Please sign in to comment.