O'Reilly logo
  • Robert Grosschopff thinks this is interesting:

sum(count by (__name__)({__name__=\~"\.\+"}))

From

Cover of Monitoring with Prometheus

Note

Right version is

sum(count by (name)({name=~".+"}))