Attach metadata to primitive