Prometheus is a system for collecting and storing metrics from your applications and infrastructure.
The easiest mental model:
Prometheus = a database + monitoring system for numbers over time.
Example
Your backend might expose metrics like:
http_requests_total 152340
http_errors_total 342
http_request_duration_seconds 0.18
active_users 57Prometheus periodically collects these metrics and stores them.
Your application
│
│ metrics
▼
Prometheus
│
│ query
▼
Grafana
│
▼
DashboardWhat is a metric?
A metric is a measurable number.
For example:
CPU usage → 72%
Memory usage → 4.2 GB
Requests → 850/sec
Errors → 12/sec
Response time → 180 msPrometheus is particularly good at storing these time-series data:
10:00 → 120 requests/sec
10:01 → 145 requests/sec
10:02 → 190 requests/sec
10:03 → 850 requests/sec ← something happenedPrometheus + Grafana
They’re often used together:
Application
│
│ metrics
▼
Prometheus
│
│ PromQL
▼
Grafana
│
▼
📊 DashboardPrometheus stores and queries the metrics.
Grafana displays them nicely.
For example, Grafana might ask Prometheus:
"What was the HTTP error rate during the last hour?"using PromQL (Prometheus Query Language).
Prometheus vs OpenSearch
This distinction is important:
| Prometheus | OpenSearch | |
|---|---|---|
| Main data | Metrics | Logs / searchable events |
| Example | CPU = 72% | "Database connection failed" |
| Data type | Time series | Documents |
| Query | PromQL | OpenSearch query |
| Typical visualization | Grafana | OpenSearch Dashboards / Grafana |
So your monitoring stack could look like:
Application
│
OpenTelemetry
│
┌──────────────┼──────────────┐
▼ ▼ ▼
Logs Metrics Traces
│ │ │
▼ ▼ ▼
OpenSearch Prometheus Tempo/Jaeger
│ │ │
└──────────────┼──────────────┘
▼
GrafanaMental shortcut:
-
Prometheus → “How many? How fast? How often?”
-
OpenSearch → “What happened?”
-
Tracing → “What happened during this particular request?”
-
Grafana → “Show me all of this.”