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

[chore][exporter/opensearchexporter] use errors.Join instead of go.uber.org/multierr #27908

Merged
merged 3 commits into from
Oct 25, 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
3 changes: 1 addition & 2 deletions exporter/opensearchexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.uber.org/multierr"
)

const (
Expand Down Expand Up @@ -46,5 +45,5 @@ func (cfg *Config) Validate() error {
if len(cfg.Namespace) == 0 {
multiErr = append(multiErr, errNamespaceNoValue)
}
return multierr.Combine(multiErr...)
return errors.Join(multiErr...)
}
2 changes: 1 addition & 1 deletion exporter/opensearchexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ require (
go.opentelemetry.io/collector/consumer v0.88.0
go.opentelemetry.io/collector/exporter v0.88.0
go.opentelemetry.io/collector/pdata v1.0.0-rcv0017
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.26.0
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -53,6 +52,7 @@ require (
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
Expand Down
3 changes: 1 addition & 2 deletions exporter/opensearchexporter/trace_bulk_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"go.opentelemetry.io/collector/consumer/consumererror"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.uber.org/multierr"
)

type traceBulkIndexer struct {
Expand All @@ -31,7 +30,7 @@ func newTraceBulkIndexer(dataset string, namespace string) *traceBulkIndexer {
}

func (tbi *traceBulkIndexer) joinedError() error {
return multierr.Combine(tbi.errs...)
return errors.Join(tbi.errs...)
}

func (tbi *traceBulkIndexer) start(client *opensearch.Client) error {
Expand Down
Loading