Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update wavefronthq/wavefront-sdk-go to v0.12.0 and fix deprecations #432

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1005,8 +1005,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