code: def metric_create(self, project, metric_name, filter_, description=None):
          
          target = "/projects/%s/metrics" % (project,)
          data = {"name": metric_name, "filter": filter_, "description": description}
          self.api_request(method="POST", path=target, data=data)
docs: API call:  create a metric resource.
  
          See
          https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create
  
          :type project: str
          :param project: ID of the project in which to create the metric.
  
          :type metric_name: str
          :param metric_name: the name of the metric
  
          :type filter_: str
          :param filter_: the advanced logs filter expression defining the
                          entries exported by the metric.
  
          :type description: str
          :param description: description of the metric.