method

instrument

instrument(name, payload = {})
public

Instrument the given block by measuring the time taken to execute it and publish it. Notice that events get sent even if an error occurs in the passed-in block.