Skip to content

Commit 39f95e4

Browse files
committed
Improve documentation
1 parent 3192d88 commit 39f95e4

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

exporter/exporterhelper/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The following configuration options can be modified:
2424
[the batch processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor)
2525
is used, the metric `batch_send_size` can be used for estimation)
2626
- `timeout` (default = 5s): Time to wait per individual attempt to send data to a backend
27-
- `sampled_logger`: Samples logging messages, which caps the CPU and I/O load of logging while keeping a representative subset of your logs.
27+
- `sampled_logger`: Enables/disables sampling of logging messages, which caps the CPU and I/O load of logging while keeping a representative subset of your logs.
2828
- `enabled` (default = true)
2929

3030
The `initial_interval`, `max_interval`, `max_elapsed_time`, and `timeout` options accept

exporter/exporterhelper/common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ func NewDefaultTimeoutSettings() TimeoutSettings {
2727
}
2828
}
2929

30-
// SampledLoggerSettings samples logging messages, which caps the CPU and I/O load of logging while keeping a
30+
// SampledLoggerSettings Configure the logger sampler, which caps the CPU and I/O load of logging while keeping a
3131
// representative subset of your logs.
3232
// Its purpose is to balance between the need for comprehensive logging and the potential performance impact of logging too much data.
3333
type SampledLoggerSettings struct {
34-
// Enable the sampledLogger
34+
// Enable/disable the sampledLogger
3535
Enabled bool `mapstructure:"enabled"`
3636
}
3737

exporter/exporterhelper/queued_retry.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,11 @@ func NewDefaultRetrySettings() RetrySettings {
267267
}
268268

269269
func createSampledLogger(logger *zap.Logger, lCfg SampledLoggerSettings) *zap.Logger {
270-
if logger.Core().Enabled(zapcore.DebugLevel) {
270+
if !lCfg.Enabled || logger.Core().Enabled(zapcore.DebugLevel) {
271271
// Debugging is enabled. Don't do any sampling.
272272
return logger
273273
}
274274

275-
if !lCfg.Enabled {
276-
return logger
277-
}
278-
279275
// Create a logger that samples all messages to 1 per 10 seconds initially,
280276
// and 1/100 of messages after that.
281277
opts := zap.WrapCore(func(core zapcore.Core) zapcore.Core {

exporter/otlphttpexporter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The following settings can be optionally configured:
3131
- `timeout` (default = 30s): HTTP request time limit. For details see https://golang.org/pkg/net/http/#Client
3232
- `read_buffer_size` (default = 0): ReadBufferSize for HTTP client.
3333
- `write_buffer_size` (default = 512 * 1024): WriteBufferSize for HTTP client.
34-
- `sampled_logger`: Samples logging messages, which caps the CPU and I/O load of logging while keeping a representative subset of your logs.
34+
- `sampled_logger`: Enables/disables sampling of logging messages, which caps the CPU and I/O load of logging while keeping a representative subset of your logs.
3535
- `enabled` (default = true)
3636

3737
Example:

0 commit comments

Comments
 (0)