diff --git a/receiver/solacereceiver/unmarshaller.go b/receiver/solacereceiver/unmarshaller.go index 92a70e533654..bb581f46f6f4 100644 --- a/receiver/solacereceiver/unmarshaller.go +++ b/receiver/solacereceiver/unmarshaller.go @@ -455,7 +455,11 @@ func (u *solaceMessageUnmarshallerV1) insertUserProperty(toMap pcommon.Map, key case *model_v1.SpanData_UserPropertyValue_DoubleValue: toMap.PutDouble(k, v.DoubleValue) case *model_v1.SpanData_UserPropertyValue_ByteArrayValue: - toMap.PutEmptyBytes(k).FromRaw(v.ByteArrayValue) + // Convert the byte array to a slice of integers + slice := toMap.PutEmptySlice(k) + for _, b := range v.ByteArrayValue { + slice.AppendEmpty().SetIntVal((int64)(b)) + } case *model_v1.SpanData_UserPropertyValue_FloatValue: toMap.PutDouble(k, float64(v.FloatValue)) case *model_v1.SpanData_UserPropertyValue_Int8Value: diff --git a/receiver/solacereceiver/unmarshaller_test.go b/receiver/solacereceiver/unmarshaller_test.go index 18a85917e178..68900d4dd935 100644 --- a/receiver/solacereceiver/unmarshaller_test.go +++ b/receiver/solacereceiver/unmarshaller_test.go @@ -962,9 +962,9 @@ func TestUnmarshallerInsertUserProperty(t *testing.T) { }, { &model_v1.SpanData_UserPropertyValue_ByteArrayValue{ByteArrayValue: []byte{1, 2, 3, 4}}, - pcommon.ValueTypeBytes, + pcommon.ValueTypeSlice, func(val pcommon.Value) { - assert.Equal(t, []byte{1, 2, 3, 4}, val.BytesVal().AsRaw()) + assert.Equal(t, []interface{}{int64(1), int64(2), int64(3), int64(4)}, val.SliceVal().AsRaw()) }, }, {