code: def _set_metric(self, metric_name, metric_type, value, tags=None):
          
          if tags is None:
              tags = []
          if metric_type == GAUGE:
              self.gauge(metric_name, value, tags=tags)
          elif metric_type == COUNT:
              self.count(metric_name, value, tags=tags)
          elif metric_type == MONOTONIC_COUNT:
              self.monotonic_count(metric_name, value, tags=tags)
          else:
              self.log.error('Metric type "{}" unknown'.format(metric_type))
docs: Set a metric