def _list_metric_descriptors(args, _):
  """Lists the metric descriptors in the project."""
  project_id = args['project']
  pattern = args['type'] or '*'
  descriptors = gcm.MetricDescriptors(project_id=project_id)
  dataframe = descriptors.as_dataframe(pattern=pattern)
  return _render_dataframe(dataframe)
Lists the metric descriptors in the project.