'Sample a set value, with optional tags, hostname and device name.
:param metric: The name of the metric
:param value: The value for the set
:param tags: (optional) A list of tags for this metric
:param hostname: (optional) A hostname for this metric. Defaults to the current hostname.
:param device_name: (optional) The device name for this metric'

def set(self, metric, value, tags=None, hostname=None, device_name=None):

    self.warning(('Deprecation    notice:    the    `set`    method    of    `AgentCheck`    is    deprecated    and    will    be    removed    ' + 'in    the    next    major    version    of    the    Agent,    please    compute    aggregates    in    your    check    and    use    `gauge`    instead'))
    self.aggregator.set(metric, value, tags, hostname, device_name)
