Skip to content

Commit 3ce79b5

Browse files
committed
Fix handling the loop for empty attributes
1 parent bf8b945 commit 3ce79b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exporter/loggingexporter/logging_exporter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func (b *logDataBuffer) logEvents(description string, se pdata.SpanEventSlice) {
235235
b.logEntry(" -> DroppedAttributesCount: %d", e.DroppedAttributesCount())
236236

237237
if e.Attributes().Len() == 0 {
238-
return
238+
continue
239239
}
240240
b.logEntry(" -> Attributes:")
241241
e.Attributes().ForEach(func(k string, v pdata.AttributeValue) {
@@ -259,7 +259,7 @@ func (b *logDataBuffer) logLinks(description string, sl pdata.SpanLinkSlice) {
259259
b.logEntry(" -> TraceState: %s", l.TraceState())
260260
b.logEntry(" -> DroppedAttributesCount: %d", l.DroppedAttributesCount())
261261
if l.Attributes().Len() == 0 {
262-
return
262+
continue
263263
}
264264
b.logEntry(" -> Attributes:")
265265
l.Attributes().ForEach(func(k string, v pdata.AttributeValue) {

0 commit comments

Comments
 (0)