Skip to content

Commit

Permalink
remove multierr
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd committed Jun 10, 2024
1 parent b0a9516 commit 95ecbae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion processor/probabilisticsamplerprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
go.opentelemetry.io/otel/metric v1.27.0
go.opentelemetry.io/otel/trace v1.27.0
go.uber.org/goleak v1.3.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
)

Expand Down Expand Up @@ -88,6 +87,7 @@ require (
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.21.0 // indirect
Expand Down
6 changes: 3 additions & 3 deletions processor/probabilisticsamplerprocessor/logsprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ package probabilisticsamplerprocessor // import "github.com/open-telemetry/opent

import (
"context"
"errors"

"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/plog"
"go.opentelemetry.io/collector/processor"
"go.opentelemetry.io/collector/processor/processorhelper"
"go.uber.org/multierr"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling"
Expand Down Expand Up @@ -56,7 +56,7 @@ func newLogRecordCarrier(l plog.LogRecord) (samplingCarrier, error) {
if tvalue := carrier.get("sampling.threshold"); len(tvalue) != 0 {
th, err := sampling.TValueToThreshold(tvalue)
if err != nil {
ret = multierr.Append(err, ret)
ret = errors.Join(err, ret)
} else {
carrier.parsed.tvalue = tvalue
carrier.parsed.threshold = th
Expand All @@ -65,7 +65,7 @@ func newLogRecordCarrier(l plog.LogRecord) (samplingCarrier, error) {
if rvalue := carrier.get("sampling.randomness"); len(rvalue) != 0 {
rnd, err := sampling.RValueToRandomness(rvalue)
if err != nil {
ret = multierr.Append(err, ret)
ret = errors.Join(err, ret)
} else {
carrier.parsed.rvalue = rvalue
carrier.parsed.randomness = rnd
Expand Down

0 comments on commit 95ecbae

Please sign in to comment.