Setting the code attribute for native metric configurations.

Signed off by: Rafael Reggiani Manzo <rr.manzo@gmail.com>