Skip to content

Commit

Permalink
Fix merge commit
Browse files Browse the repository at this point in the history
  • Loading branch information
antonjim-te committed Sep 11, 2023
1 parent a5d054b commit 868041f
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions exporter/exporterhelper/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/consumer"
Expand Down Expand Up @@ -268,22 +267,3 @@ func (ts *timeoutSender) send(req internal.Request) error {
}
return req.Export(ctx)
}

func createSampledLogger(logger *zap.Logger) *zap.Logger {
if logger.Core().Enabled(zapcore.DebugLevel) {
// Debugging is enabled. Don't do any sampling.
return logger
}

// Create a logger that samples all messages to 1 per 10 seconds initially,
// and 1/100 of messages after that.
opts := zap.WrapCore(func(core zapcore.Core) zapcore.Core {
return zapcore.NewSamplerWithOptions(
core,
10*time.Second,
1,
100,
)
})
return logger.WithOptions(opts)
}

0 comments on commit 868041f

Please sign in to comment.