Skip to content

Commit

Permalink
fix: linter and replace deprecated scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
rogercoll committed Jan 9, 2025
1 parent 7b4e7d7 commit 123aa3e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 57 deletions.
2 changes: 1 addition & 1 deletion receiver/valkeyreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"go.opentelemetry.io/collector/config/confignet"
"go.opentelemetry.io/collector/config/configtls"
"go.opentelemetry.io/collector/receiver/scraperhelper"
"go.opentelemetry.io/collector/scraper/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/valkeyreceiver/internal/metadata"
)
Expand Down
2 changes: 1 addition & 1 deletion receiver/valkeyreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"go.opentelemetry.io/collector/config/configtls"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/scraperhelper"
"go.opentelemetry.io/collector/scraper"
"go.opentelemetry.io/collector/scraper/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/valkeyreceiver/internal/metadata"
)
Expand Down
39 changes: 20 additions & 19 deletions receiver/valkeyreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ go 1.22.7
require (
github.com/google/go-cmp v0.6.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.116.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.116.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.116.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.117.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.117.0
github.com/stretchr/testify v1.10.0
github.com/testcontainers/testcontainers-go v0.34.0
github.com/valkey-io/valkey-go v1.0.45
go.opentelemetry.io/collector/component v0.116.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/component/componenttest v0.116.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/component v0.117.0
go.opentelemetry.io/collector/component/componenttest v0.117.0
go.opentelemetry.io/collector/config/confignet v1.22.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/config/configtls v1.22.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/confmap v1.22.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/consumer v1.22.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/consumer/consumertest v0.116.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/consumer v1.23.0
go.opentelemetry.io/collector/consumer/consumertest v0.117.0
go.opentelemetry.io/collector/filter v0.116.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/pdata v1.22.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/receiver v0.116.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/receiver/receivertest v0.116.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/scraper v0.116.1-0.20241220212031-7c2639723f67
go.opentelemetry.io/collector/pdata v1.23.0
go.opentelemetry.io/collector/receiver v0.117.0
go.opentelemetry.io/collector/receiver/receivertest v0.117.0
go.opentelemetry.io/collector/scraper v0.117.0
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
)
Expand Down Expand Up @@ -66,7 +66,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.116.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.117.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand All @@ -80,12 +80,13 @@ require (
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/collector/config/configopaque v1.22.1-0.20241220212031-7c2639723f67 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.116.1-0.20241220212031-7c2639723f67 // indirect
go.opentelemetry.io/collector/consumer/consumererror v0.116.1-0.20241220212031-7c2639723f67 // indirect
go.opentelemetry.io/collector/consumer/xconsumer v0.116.1-0.20241220212031-7c2639723f67 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.116.1-0.20241220212031-7c2639723f67 // indirect
go.opentelemetry.io/collector/pipeline v0.116.1-0.20241220212031-7c2639723f67 // indirect
go.opentelemetry.io/collector/receiver/xreceiver v0.116.1-0.20241220212031-7c2639723f67 // indirect
go.opentelemetry.io/collector/config/configtelemetry v0.117.0 // indirect
go.opentelemetry.io/collector/consumer/consumererror v0.117.0 // indirect
go.opentelemetry.io/collector/consumer/xconsumer v0.117.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.117.0 // indirect
go.opentelemetry.io/collector/pipeline v0.117.0 // indirect
go.opentelemetry.io/collector/receiver/xreceiver v0.117.0 // indirect
go.opentelemetry.io/collector/scraper/scraperhelper v0.117.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect
Expand All @@ -100,8 +101,8 @@ require (
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/grpc v1.69.0 // indirect
google.golang.org/protobuf v1.36.0 // indirect
google.golang.org/grpc v1.69.2 // indirect
google.golang.org/protobuf v1.36.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
70 changes: 36 additions & 34 deletions receiver/valkeyreceiver/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions receiver/valkeyreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import (
)

//go:embed testdata/all-metrics/raw_info.txt
var raw_info string
var rawInfo string

type mockClient struct{}

func (mockClient) retrieveInfo(context.Context) (map[string]string, error) {
return parseRawDataMap(raw_info)
return parseRawDataMap(rawInfo)
}

func (mockClient) close() error {
Expand Down

0 comments on commit 123aa3e

Please sign in to comment.