Skip to content

Commit faea14e

Browse files
committed
feat(otel-2647): update int attribute handling
1 parent 9766573 commit faea14e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

receiver/datadogrumreceiver/internal/translator/rum_translator.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,11 @@ func setAttributes(flatPayload map[string]any, attributes pcommon.Map) {
487487
attributes.PutDouble(meta.OTLPName, f)
488488
}
489489
case IntegerAttribute:
490-
if i, ok := val.(int); ok {
491-
attributes.PutInt(meta.OTLPName, int64(i))
490+
if i, ok := val.(int64); ok {
491+
attributes.PutInt(meta.OTLPName, i)
492+
} else if f, ok := val.(float64); ok {
493+
i := int64(f)
494+
attributes.PutInt(meta.OTLPName, i)
492495
}
493496
case ObjectAttribute:
494497
if o, ok := val.(map[string]any); ok {

0 commit comments

Comments
 (0)