From 320d779e5368d43f2ff57d32446a3d0c7c6049c4 Mon Sep 17 00:00:00 2001 From: Justin Bergen Date: Sat, 13 Jan 2024 23:21:34 -0700 Subject: [PATCH] Removed duplicate appending of log records --- .../OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift b/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift index 4e9829137..cc81dda94 100644 --- a/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift +++ b/Sources/Exporters/OpenTelemetryProtocolHttp/logs/OtlpHttpLogExporter.swift @@ -23,9 +23,7 @@ public class OtlpHttpLogExporter : OtlpHttpExporterBase, LogRecordExporter { } public func export(logRecords: [OpenTelemetrySdk.ReadableLogRecord], explicitTimeout: TimeInterval? = nil) -> OpenTelemetrySdk.ExportResult { - pendingLogRecords.append(contentsOf: logRecords) var sendingLogRecords: [ReadableLogRecord] = [] - exporterLock.withLockVoid { pendingLogRecords.append(contentsOf: logRecords) sendingLogRecords = pendingLogRecords