Use exposed metric ids and metadata in js

With the notable exception of long (see comment in browserRecord.html).
This makes context idents a bit worse, but oh well.