diff --git a/exporter/fileexporter/buffered_writer.go b/exporter/fileexporter/buffered_writer.go index 64ee151fa217..6e50b6519296 100644 --- a/exporter/fileexporter/buffered_writer.go +++ b/exporter/fileexporter/buffered_writer.go @@ -5,9 +5,8 @@ package fileexporter // import "github.com/open-telemetry/opentelemetry-collecto import ( "bufio" + "errors" "io" - - "go.uber.org/multierr" ) // bufferedWriteCloser is intended to use more memory @@ -33,7 +32,7 @@ func (bwc *bufferedWriteCloser) Write(p []byte) (n int, err error) { } func (bwc *bufferedWriteCloser) Close() error { - return multierr.Combine( + return errors.Join( bwc.buffered.Flush(), bwc.wrapped.Close(), ) diff --git a/exporter/fileexporter/buffered_writer_test.go b/exporter/fileexporter/buffered_writer_test.go index a6512258d2fa..60f79a08a76b 100644 --- a/exporter/fileexporter/buffered_writer_test.go +++ b/exporter/fileexporter/buffered_writer_test.go @@ -5,6 +5,7 @@ package fileexporter import ( "bytes" + "errors" "fmt" "io" "os" @@ -13,7 +14,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.uber.org/multierr" ) const ( @@ -83,7 +83,7 @@ func BenchmarkWriter(b *testing.B) { for i := 0; i < b.N; i++ { _, err = w.Write(payload) } - errBenchmark = multierr.Combine(err, w.Close()) + errBenchmark = errors.Join(err, w.Close()) }) } } diff --git a/exporter/fileexporter/go.mod b/exporter/fileexporter/go.mod index 11be5ffcb8db..6eba04c79ac8 100644 --- a/exporter/fileexporter/go.mod +++ b/exporter/fileexporter/go.mod @@ -12,7 +12,6 @@ require ( go.opentelemetry.io/collector/consumer v0.87.1-0.20231017160804-ec0725874313 go.opentelemetry.io/collector/exporter v0.87.1-0.20231017160804-ec0725874313 go.opentelemetry.io/collector/pdata v1.0.0-rcv0016.0.20231017160804-ec0725874313 - go.uber.org/multierr v1.11.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 ) @@ -39,6 +38,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 go.uber.org/zap v1.26.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/sys v0.13.0 // indirect