diff --git a/receiver/otelarrowreceiver/internal/logs/otlp.go b/receiver/otelarrowreceiver/internal/logs/otlp.go index 02a81fd813da..09dacbfd00a3 100644 --- a/receiver/otelarrowreceiver/internal/logs/otlp.go +++ b/receiver/otelarrowreceiver/internal/logs/otlp.go @@ -55,7 +55,9 @@ func (r *Receiver) Export(ctx context.Context, req plogotlp.ExportRequest) (plog } defer func() { releaseErr := r.boundedQueue.Release(sizeBytes) - r.logger.Error("Error releasing bytes from semaphore", zap.Error(releaseErr)) + if releaseErr != nil { + r.logger.Error("Error releasing bytes from semaphore", zap.Error(releaseErr)) + } }() err = r.nextConsumer.ConsumeLogs(ctx, ld) diff --git a/receiver/otelarrowreceiver/internal/metrics/otlp.go b/receiver/otelarrowreceiver/internal/metrics/otlp.go index 58796c7c044e..e4cc8dcd1def 100644 --- a/receiver/otelarrowreceiver/internal/metrics/otlp.go +++ b/receiver/otelarrowreceiver/internal/metrics/otlp.go @@ -55,7 +55,9 @@ func (r *Receiver) Export(ctx context.Context, req pmetricotlp.ExportRequest) (p } defer func() { releaseErr := r.boundedQueue.Release(sizeBytes) - r.logger.Error("Error releasing bytes from semaphore", zap.Error(releaseErr)) + if releaseErr != nil { + r.logger.Error("Error releasing bytes from semaphore", zap.Error(releaseErr)) + } }() err = r.nextConsumer.ConsumeMetrics(ctx, md) diff --git a/receiver/otelarrowreceiver/internal/trace/otlp.go b/receiver/otelarrowreceiver/internal/trace/otlp.go index a510f25fca43..d873e3324889 100644 --- a/receiver/otelarrowreceiver/internal/trace/otlp.go +++ b/receiver/otelarrowreceiver/internal/trace/otlp.go @@ -55,7 +55,9 @@ func (r *Receiver) Export(ctx context.Context, req ptraceotlp.ExportRequest) (pt } defer func() { releaseErr := r.boundedQueue.Release(sizeBytes) - r.logger.Error("Error releasing bytes from semaphore", zap.Error(releaseErr)) + if releaseErr != nil { + r.logger.Error("Error releasing bytes from semaphore", zap.Error(releaseErr)) + } }() err = r.nextConsumer.ConsumeTraces(ctx, td)