Skip to content

Commit

Permalink
Fix duplicate appending of logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoBonafonte committed Feb 1, 2024
1 parent 9afc157 commit ebca8c9
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,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
Expand Down

0 comments on commit ebca8c9

Please sign in to comment.