Skip to content

Commit

Permalink
[chore][exporter/opensearchexporter] use errors.Join instead of go.ub…
Browse files Browse the repository at this point in the history
…er.org/multierr (open-telemetry#27908)

**Description:** <Describe what has changed.>
use errors.Join instead of go.uber.org/multierr

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#25121 

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
  • Loading branch information
bagmeg authored and jmsnll committed Nov 12, 2023
1 parent df48249 commit 1244952
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
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

0 comments on commit 1244952

Please sign in to comment.