'Capture information about the current selected Unit within the Sequence.'

def _capture_current_unit_metrics(self, display_items):

    if (not newrelic):
        return
    if (1 <= self.position <= len(display_items)):
        current = display_items[(self.position - 1)]
        newrelic.agent.add_custom_parameter('seq.current.block_id', unicode(current.location))
        newrelic.agent.add_custom_parameter('seq.current.display_name', (current.display_name or ''))
        child_locs = self._locations_in_subtree(current)
        newrelic.agent.add_custom_parameter('seq.current.num_items', len(child_locs))
        curr_block_counts = collections.Counter((usage_key.block_type for usage_key in child_locs))
        for (block_type, count) in curr_block_counts.items():
            newrelic.agent.add_custom_parameter('seq.current.block_counts.{}'.format(block_type), count)
