def create(self, **kwargs):
        """Create a metric."""
        url_str = self.base_url
        if 'tenant_id' in kwargs:
            url_str = url_str + '?tenant_id=%s' % kwargs['tenant_id']
            del kwargs['tenant_id']

        data = kwargs['jsonbody'] if 'jsonbody' in kwargs else kwargs
        body = self.client.create(url=url_str, json=data)
        return body
Create a metric.