Skip to content

Commit

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

**Description:** 
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 Oct 19, 2023
1 parent d474dca commit cbe5e71
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion exporter/elasticsearchexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ require (
go.opentelemetry.io/collector/exporter v0.87.1-0.20231017160804-ec0725874313
go.opentelemetry.io/collector/pdata v1.0.0-rcv0016.0.20231017160804-ec0725874313
go.opentelemetry.io/collector/semconv v0.87.1-0.20231017160804-ec0725874313
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.26.0
)

Expand Down Expand Up @@ -44,6 +43,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
4 changes: 2 additions & 2 deletions exporter/elasticsearchexporter/logs_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry

import (
"context"
"errors"
"fmt"

"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/plog"
"go.uber.org/multierr"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -96,7 +96,7 @@ func (e *elasticsearchLogsExporter) pushLogsData(ctx context.Context, ld plog.Lo
}
}

return multierr.Combine(errs...)
return errors.Join(errs...)
}

func (e *elasticsearchLogsExporter) pushLogRecord(ctx context.Context, resource pcommon.Resource, record plog.LogRecord) error {
Expand Down
4 changes: 2 additions & 2 deletions exporter/elasticsearchexporter/trace_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry

import (
"context"
"errors"
"fmt"

"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/ptrace"
"go.uber.org/multierr"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -88,7 +88,7 @@ func (e *elasticsearchTracesExporter) pushTraceData(
}
}

return multierr.Combine(errs...)
return errors.Join(errs...)
}

func (e *elasticsearchTracesExporter) pushTraceRecord(ctx context.Context, resource pcommon.Resource, span ptrace.Span) error {
Expand Down

0 comments on commit cbe5e71

Please sign in to comment.