[runtime] Fix #24605 : "counters not enabled" message with embeders
[runtime] Add support to trace generics