The following query lists all available metrics:

sum by(__name__)({app="bar"})

Where bar is the application name, as you can see in the log entries posted in the question.

Answer from naimdjon on Stack Overflow
🌐
OpenObserve
openobserve.ai › home › blog › prometheus metrics count basics
Prometheus Metrics Count Basics
September 26, 2025 - These data points are stored as time series, and each unique combination of metric name and labels becomes a separate time series. When you run a count query, Prometheus looks at all the relevant time series and performs calculations on them. This architecture is why Prometheus is so fast at handling large amounts of time-series data, but it also explains why counting unique values requires special techniques. count(count by (status_code) (http_requests_total))
🌐
Prometheus
prometheus.io › docs › concepts › metric_types
Metric types | Prometheus
Similar to a histogram, a summary samples observations (usually things like request durations and response sizes). While it also provides a total count of observations and a sum of all observed values, it calculates configurable quantiles over a sliding time window. A summary with a base metric name of <basename> exposes multiple time series during a scrape:
Discussions

How to get a total number of metrics scraped by Prometheus?
The “prometheus_tsdb_head_series” metric may be what you’re looking for. Also check out the “tsdb analyze” command in promtool for some more TSDB insights. More on reddit.com
🌐 r/PrometheusMonitoring
4
1
September 2, 2021
Prometheus: grouping metrics by metric names - Stack Overflow
I have also tried to use wildcard in the metric name, prometheus is complaining about that. Looking at the metrics, I can see that some of them have dynamic names, most probably delivered by dropwizard metrics. More on stackoverflow.com
🌐 stackoverflow.com
DataDog Custom Metrics
What an absolute mess DD's custom metrics are. Have they guilded the dumpster fire over and over? New Relic's costs are such a breath of fresh air. All data charged at the same rate is simply much more understandable. More on reddit.com
🌐 r/devops
18
15
October 8, 2022
Sort query by name
You could use Grafana built in transformations to sort the results More on reddit.com
🌐 r/grafana
3
2
April 4, 2022
🌐
Promlabs
promlabs.com › blog › 2020 › 12 › 17 › promql-queries-for-exploring-your-metrics
PromLabs | Blog - PromQL Queries for Exploring Your Metrics
December 17, 2020 - If your UI does not already show you this list in one way or another (it really should!), you can query for it by first selecting all series, then grouping by the special metric name label __name__: ... Note: A more efficient, non-PromQL way to get the same information is to use Prometheus's label values metadata endpoint to get all values for the __name__ label, e.g.: https://demo.promlabs.com/api/v1/label/name/values.
🌐
Mkaz
mkaz.me › blog › 2023 › simple-prometheus-queries-for-metrics-inspection
Simple Prometheus queries for metrics inspection | Michal Kazmierczak
For starters, let’s pull the total number of series. That is the count of all unique label combinations (including the __name__ label). ... This query relies on one simple rule: Prometheus Query Language (PromQL) requires to provide either a metric name or at least one label matcher.
🌐
VictoriaMetrics
victoriametrics.com › blog › prometheus metrics explained: counters, gauges, histograms & summaries
Prometheus Metrics Explained: Counters, Gauges, Histograms & Summaries
February 21, 2025 - Metric name suffix: The suffix usually indicates either the metric type or the base unit of the measurement (typically in plural form). Metric type is often reflected in the suffix, such as _total and _count for counters. It can be combined ...
Find elsewhere
🌐
Prometheus
prometheus.io › docs › prometheus › latest › querying › examples
Query examples | Prometheus
Return the per-second rate for all time series with the http_requests_total metric name, as measured over the last 5 minutes: ... Assuming that the http_requests_total time series all have the labels job (fanout by job name) and instance (fanout by instance of the job), we might want to sum over the rate of all instances, so we get fewer output time series, but still preserve the job dimension:
🌐
GitHub
github.com › prometheus › docs › blob › main › docs › concepts › metric_types.md
docs/docs/concepts/metric_types.md at main · prometheus/docs
Similar to a histogram, a summary samples observations (usually things like request durations and response sizes). While it also provides a total count of observations and a sum of all observed values, it calculates configurable quantiles over a sliding time window. A summary with a base metric name of <basename> exposes multiple time series during a scrape:
Author: prometheus
🌐
Prometheus
prometheus.io › docs › practices › naming
Metric and label naming | Prometheus
Also note that this applies to units in the narrow sense (like the units in the table below), but not to countable things in general. For example, connections or notifications are not considered units for this rule and do not have to be at the end of the metric name.
🌐
Dash0
dash0.com › home › knowledge base › understanding the prometheus metric types
Understanding the Prometheus Metric Types · Dash0
July 21, 2025 - The Histogram is the most powerful way to measure latency and other distributed values in Prometheus. Instead of storing every single measurement, it counts how many fall into pre-configured buckets.
🌐
Better Stack
betterstack.com › community › guides › monitoring › prometheus-metrics-explained
A Practical Guide to Prometheus Metric Types | Better Stack Community
Metrics are typically exposed by applications on HTTP endpoints (typically /metrics), and scraped periodically by Prometheus. This pull-based model ensures that Prometheus has control over data collection frequency and consistency. Prometheus offers four core metric types to capture diverse system behaviors: Counters for tracking ever-increasing values, like the total number of exceptions thrown.
🌐
GitConnected
levelup.gitconnected.com › prometheus-counter-metrics-d6c393d86076
Working With Prometheus Counter Metrics | Level Up Coding
February 28, 2022 - This article combines the theory ... of Prometheus’ counter metric. We will see how the PromQL functions rate, increase, irate, and resets work, and to top it off, we will look at some graphs generated by counter metrics on production data.
🌐
Last9
last9.io › blog › prometheus-metrics-types-a-deep-dive
Prometheus Metrics Types - A Deep Dive | Last9
June 17, 2026 - Prometheus metric names should use snake_case, start with a single-word application or domain prefix (for example http_ or node_), and end with the unit of measurement (for example _seconds or _bytes).
🌐
client_python
prometheus.github.io › client_python › instrumenting › counter
Counter | client_python
April 9, 2026 - This is for compatibility between OpenMetrics and the Prometheus text format, as OpenMetrics requires the _total suffix. Counter(name, documentation, labelnames=(), namespace='', subsystem='', unit='', registry=REGISTRY) namespace, subsystem, and name are joined with underscores to form the full metric name:
🌐
OneUptime
oneuptime.com › home › blog › how to count unique label values in prometheus
How to Count Unique Label Values in Prometheus
December 17, 2025 - However, understanding how many unique values exist for a given label is crucial for cardinality management and query optimization. This guide shows you how to count unique label values using PromQL. Use count(group by (label_name) (metric_name)) to ...
🌐
Robust Perception
robustperception.io › which-are-my-biggest-metrics
Which are my biggest metrics? – Robust Perception | Prometheus Monitoring Experts
December 16, 2015 - To know which metrics are using the most resources it'd be good to count how many time series each has, and then display the top 10. This can be done with an expression selecting all metrics, aggregating a count based on the metric name and returning the top 10 in the expression browser (make ...
🌐
client_java
prometheus.github.io › client_java › getting-started › metric-types
Metric Types | client_java
For the default OpenMetrics 1.0 and Prometheus text formats, counters are exposed with the _total suffix. You can name a counter either service_time_seconds or service_time_seconds_total; the exposed name will be service_time_seconds_total in both cases. The experimental OpenMetrics 2.0 writer ...
🌐
Tigera
tigera.io › home › prometheus monitoring › prometheus metrics
Prometheus Metrics: A Practical Guide | Tigera – Creator of Calico
July 30, 2021 - Again, the same memory usage method is used here, but with different metric names. node_filesystem_avail_bytes/node_filesystem_size_bytes*100 · Prometheus has its own native query language, PromQL, which you use to select, aggregate, and compute over metrics.
🌐
Google Groups
groups.google.com › g › prometheus-users › c › 5LmkR3clOI0
Count Samples per Metrics
to Prometheus Users · So far, we have a promql query that shows the total amount of time series per metric (count by (__name__)({__name__=~".+"})) and also per target(scrape_samples_scraped). We also can take the total amount of chunk samples ( prometheus_tsdb_compaction_chunk_samples_count).