'Capture information about the number and types of XBlock content in
the sequence as a whole. We send this information to New Relic so that
we can do better performance analysis of courseware.'

def _capture_full_seq_item_metrics(self, display_items):

    if (not newrelic):
        return
    newrelic.agent.add_custom_parameter('seq.num_units', len(display_items))
    all_item_keys = self._locations_in_subtree(self)
    newrelic.agent.add_custom_parameter('seq.num_items', len(all_item_keys))
    block_counts = collections.Counter((usage_key.block_type for usage_key in all_item_keys))
    for (block_type, count) in block_counts.items():
        newrelic.agent.add_custom_parameter('seq.block_counts.{}'.format(block_type), count)
