-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Currently, when the key-values are discarded because of key duplication
opentelemetry-go/sdk/log/record.go
Lines 195 to 196 in afd4763
attrs, drop = dedup(attrs) | |
r.setDropped(drop) |
opentelemetry-go/sdk/log/record.go
Lines 300 to 301 in afd4763
attrs, drop = dedup(attrs) | |
r.setDropped(drop) |
opentelemetry-go/sdk/log/record.go
Lines 431 to 432 in afd4763
kvs, dropped := dedup(val.AsMap()) | |
r.addDropped(dropped) |
then limit reached: dropping log Record attributes
log is being emitted which is inaccurate; e.g.
opentelemetry-go/sdk/log/record.go
Lines 104 to 107 in afd4763
func (r *Record) setDropped(n int) { | |
logAttrDropped() | |
r.dropped = n | |
} |
Instead we should log something like key duplication: dropping key-value pair
instead.
Moreover Record.DroppedAttributes
is also adding the count if dropped key-value pairs during deduplication.
opentelemetry-go/sdk/log/record.go
Lines 353 to 357 in afd4763
// DroppedAttributes returns the number of attributes dropped due to limits | |
// being reached. | |
func (r *Record) DroppedAttributes() int { | |
return r.dropped | |
} |
I think we do not need to count the dropped duplicates as this is an error scenario and it would be enough to just log ones when it happens.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status