Skip to content

Commit

Permalink
Make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
petern48 committed Mar 2, 2025
1 parent b302d45 commit 5a9c302
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions receiver/cloudflarereceiver/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ func (l *logsReceiver) processLogs(now pcommon.Timestamp, logs []map[string]any)
attrName := field
if len(l.cfg.Attributes) != 0 {
// Only process fields that are in the config mapping
if mappedAttr, ok := l.cfg.Attributes[field]; ok {
attrName = mappedAttr
} else {
mappedAttr, ok := l.cfg.Attributes[field];
if !ok {
// Skip fields not in mapping when we have a config
continue
}
attrName = mappedAttr
}
// else if l.cfg.Attributes is empty, default to processing all fields with no renaming

Expand Down

0 comments on commit 5a9c302

Please sign in to comment.