Skip to content

Commit

Permalink
update wavefronthq/wavefront-sdk-go to v0.12.0 and fix deprecations
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <[email protected]>
  • Loading branch information
cpanato authored and poiana committed Apr 27, 2023
1 parent 215930f commit 58ec86e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/spf13/viper v1.15.0
github.com/streadway/amqp v1.0.0
github.com/stretchr/testify v1.8.2
github.com/wavefronthq/wavefront-sdk-go v0.10.3
github.com/wavefronthq/wavefront-sdk-go v0.12.0
github.com/xitongsys/parquet-go v1.6.2
github.com/xitongsys/parquet-go-source v0.0.0-20230312005205-fbbcdea5f512
golang.org/x/oauth2 v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1007,8 +1007,8 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/wavefronthq/wavefront-sdk-go v0.10.3 h1:tQaOy6FdnU4//roxb2nBrTXsGOQ/5iYZ02JT5vLJESY=
github.com/wavefronthq/wavefront-sdk-go v0.10.3/go.mod h1:oKJ9Y0y36n+szFm2NiivXI+UubZe3lwfWnN1p+mFNDw=
github.com/wavefronthq/wavefront-sdk-go v0.12.0 h1:eSdVP6QH9DtlaZQn5atSo19hLpsiIb4rmKCTJwN4KqU=
github.com/wavefronthq/wavefront-sdk-go v0.12.0/go.mod h1:lgPeRbc4/WtFx2kefX4OdaILy2g7iTXXM3SWaMaCYYs=
github.com/xdg/scram v1.0.5 h1:TuS0RFmt5Is5qm9Tm2SoD89OPqe4IRiFtyFY4iwWXsw=
github.com/xdg/scram v1.0.5/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.3 h1:cmL5Enob4W83ti/ZHuZLuKD/xqJfus4fVPwE+/BDm+4=
Expand Down
24 changes: 10 additions & 14 deletions outputs/wavefront.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,17 @@ func NewWavefrontClient(config *types.Configuration, stats *types.Statistics, pr

switch config.Wavefront.EndpointType {
case "direct":
server := fmt.Sprintf("https://%s", config.Wavefront.EndpointHost)
directCfg := &wavefront.DirectConfiguration{
Server: server,
Token: config.Wavefront.EndpointToken,
FlushIntervalSeconds: flushInterval,
BatchSize: batchSize,
}
sender, err = wavefront.NewDirectSender(directCfg)
server := fmt.Sprintf("https://%s@%s", config.Wavefront.EndpointToken, config.Wavefront.EndpointHost)
sender, err = wavefront.NewSender(
server,
wavefront.BatchSize(batchSize),
wavefront.FlushIntervalSeconds(flushInterval),
)
case "proxy":
proxyCfg := &wavefront.ProxyConfiguration{
Host: config.Wavefront.EndpointHost,
MetricsPort: config.Wavefront.EndpointMetricPort,
FlushIntervalSeconds: flushInterval,
}
sender, err = wavefront.NewProxySender(proxyCfg)
sender, err = wavefront.NewSender(
config.Wavefront.EndpointHost,
wavefront.MetricsPort(config.Wavefront.EndpointMetricPort),
)
default:
return nil, fmt.Errorf("failed to configure wavefront sender: invalid type %s", config.Wavefront.EndpointType)
}
Expand Down

0 comments on commit 58ec86e

Please sign in to comment.