From 20536a1ca3f6220c9b55ae319757bd8a88039bb3 Mon Sep 17 00:00:00 2001 From: Antonio Jimenez Date: Wed, 6 Sep 2023 15:52:27 +0200 Subject: [PATCH] Review PR --- exporter/exporterhelper/queued_retry.go | 6 +++--- service/telemetry/config.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/exporter/exporterhelper/queued_retry.go b/exporter/exporterhelper/queued_retry.go index 9178ed64fdc..d1c0655e111 100644 --- a/exporter/exporterhelper/queued_retry.go +++ b/exporter/exporterhelper/queued_retry.go @@ -77,7 +77,7 @@ type queuedRetrySender struct { } func newQueuedRetrySender(id component.ID, signal component.DataType, queue internal.ProducerConsumerQueue, - rCfg RetrySettings, nextSender requestSender, sampledLogger *zap.Logger) *queuedRetrySender { + rCfg RetrySettings, nextSender requestSender, logger *zap.Logger) *queuedRetrySender { retryStopCh := make(chan struct{}) traceAttr := attribute.String(obsmetrics.ExporterKey, id.String()) @@ -88,7 +88,7 @@ func newQueuedRetrySender(id component.ID, signal component.DataType, queue inte queue: queue, retryStopCh: retryStopCh, traceAttribute: traceAttr, - logger: sampledLogger, + logger: logger, // TODO: this can be further exposed as a config param rather than relying on a type of queue requeuingEnabled: queue != nil && queue.IsPersistent(), } @@ -98,7 +98,7 @@ func newQueuedRetrySender(id component.ID, signal component.DataType, queue inte cfg: rCfg, nextSender: nextSender, stopCh: retryStopCh, - logger: sampledLogger, + logger: logger, // Following three functions actually depend on queuedRetrySender onTemporaryFailure: qrs.onTemporaryFailure, } diff --git a/service/telemetry/config.go b/service/telemetry/config.go index 9bcbf930f45..59f4400bd35 100644 --- a/service/telemetry/config.go +++ b/service/telemetry/config.go @@ -55,7 +55,7 @@ type LogsConfig struct { // (default = false) DisableStacktrace bool `mapstructure:"disable_stacktrace"` - // Sampling sets a sampling policy for the extra sampled logger. + // Sampling sets a sampling policy for the more efficient sampled logger. // Default: // initial: 1 // thereafter: 100 @@ -92,7 +92,7 @@ type LogsConfig struct { InitialFields map[string]any `mapstructure:"initial_fields"` } -// LogsSamplingConfig sets a sampling strategy for the extra sampled logger. Sampling caps the +// LogsSamplingConfig sets a sampling strategy for the more efficient sampled logger. Sampling caps the // global CPU and I/O load that logging puts on your process while attempting // to preserve a representative subset of your logs. type LogsSamplingConfig struct {