You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/0071-Entity/01-context.md
+28-39Lines changed: 28 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
3
3
## Abstract
4
4
5
-
This proposal introduces native support for **Entities** in Prometheus—a first-class representation of the things that produce telemetry, distinct from the telemetry they produce.
5
+
This proposal introduces native support for **Entities** in Prometheus—a first-class concept representing **the "things" that produce telemetry**.
6
6
7
-
Today, Prometheus relies on Info-type metrics to represent metadata about monitored objects: gauges with an `_info` suffix, a constant value of `1`, and labels containing the metadata. But this approach is fundamentally flawed: **the thing that produces metrics is not itself a metric**. A Kubernetes pod, a service instance, or a host are entities with their own identity and lifecycle—they should not be stored as time series with sample values.
7
+
A Kubernetes pod, a service instance, a physical host—these are not metrics themselves, but rather the *sources* of metrics. They have their own identity, lifecycle, and attributes that provide context for understanding the telemetry they produce. Today, Prometheus lacks a native way to represent these "things". While the ecosystem has developed conventions (like info metrics) to work around this gap, Prometheus itself doesn't understand what these conventions represent.
8
8
9
-
This conflation forces users to rely on verbose `group_left` joins to attach metadata to metrics, creates storage inefficiency for constant values, and loses the semantic distinction between what identifies an entity and what describes it.
9
+
**This proposal establishes Entities as a foundational concept in Prometheus.** An Entity represents a distinct object of interest in your infrastructure or application—something that has an identity, produces telemetry, and whose metadata helps you understand that telemetry.
10
10
11
-
By introducing Entities as a native concept, Prometheus can provide cleaner query ergonomics, optimized storage for metadata, explicit lifecycle management, and proper semantics that distinguish between identifying labels (what makes an entity unique) and descriptive labels (additional context about that entity).
11
+
By making Entities first-class, this proposal enables Prometheus to support them consistently across all layers. Exposition formats gain semantics to declare entity information; SDKs provide clean abstractions for instrumenting entities; storage optimizes for entity metadata and relationships; the query language automatically correlates entity context with metrics; and alerting maintains stable alert identity as entity attributes change.
12
12
13
-
This proposal also aligns with Prometheus's commitment to being the default store for OpenTelemetry metrics. OpenTelemetry's Entity model provides a well-defined structure for representing monitored objects, and native Entity support enables seamless translation between OTel Entities and Prometheus.
13
+
This proposal also aligns with Prometheus's commitment to being the default store for OpenTelemetry metrics, which has a well-defined Entity model. Native Entity support enables seamless integration between OpenTelemetry's view of the world and Prometheus's.
An **Entity** represents a distinct object of interest that produces or is associated with telemetry. Unlike Info metrics, Entities are not metrics—they are first-class objects with their own identity, labels, and lifecycle.
31
+
An **Entity** represents a distinct object of interest that produces or is associated with telemetry. Unlike Info metrics, Entities are not metrics—they are first-class objects with their own identity, labels, and
32
+
lifecycle.
32
33
33
-
In OpenTelemetry, an entity is an object of interest that produces telemetry data. Entities represent things like services, hosts, containers, or Kubernetes pods. Each entity has a type (e.g., `k8s.pod`, `host`, `service`) and a set of attributes that describe it.
34
+
Examples: a Kubernetes pod, a physical host, a service instance, a database table.
34
35
35
-
This proposal adopts the Entity concept as the native Prometheus representation for what was previously expressed through Info metric conventions.
36
+
Each entity has:
37
+
- A **type** (e.g., `k8s.pod`, `host`, `service`)
38
+
-**Identifying labels** that uniquely define it (immutable for the entity's lifetime)
39
+
-**Descriptive labels** that provide additional context (may change over time)
40
+
-**Lifecycle boundaries** (creation time, end time)
41
+
42
+
In OpenTelemetry, an entity is an object of interest that produces telemetry data. This proposal adopts a compatible Entity concept as Prometheus's native representation for what was previously expressed only through info metric conventions.
43
+
44
+
**The relationship:** Entities are the concept; info metrics are how they're serialized in the exposition format.
36
45
37
46
#### Resource Attributes
38
47
@@ -66,46 +75,26 @@ Examples:
66
75
67
76
## Problem Statement
68
77
69
-
### Entities Are Not Metrics
78
+
### Prometheus Is Missing the Entity Concept
70
79
71
-
At the heart of the Info metric pattern lies a conceptual mismatch: **the thing that produces metrics is not itself a metric**.
80
+
Prometheus has a powerful data model for representing **metrics**—time series of numeric measurements identified by labels. But it lacks a native representation for "things" that produce metrics.
72
81
73
-
Consider a Kubernetes pod. It has an identity (namespace, UID), labels that describe it (name, node, pod labels), a lifecycle (creation time, termination), and it produces telemetry (CPU usage, memory consumption, request counts). The pod is the *source* of metrics—it is not *a* metric.
82
+
Consider a Kubernetes pod. It has an identity (namespace, UID), labels that describe it (name, node, status), a lifecycle (creation time, termination), and it produces telemetry (CPU usage, memory consumption, request counts). The pod is the *source* of metrics—it is conceptually distinct from the metrics it produces.
74
83
75
-
Yet today, we represent this pod as a metric:
84
+
Today, the Prometheus ecosystem uses **info metrics** to represent entity metadata:
This representation has several conceptual problems:
82
-
83
-
1.**The value is meaningless**: The `1` carries no information. It exists only because Prometheus's data model requires a numeric value.
84
-
2.**Identity is conflated with data**: All labels are treated equally. There's no distinction between `uid` (which identifies the pod) and `node` (which describes where it's running and could change).
85
-
3.**Lifecycle is implicit**: When a pod is deleted and recreated with the same name, Prometheus sees label churn. There's no explicit representation of "this entity ended, a new one began."
86
-
4.**Correlation requires workarounds**: To associate the pod's metadata with its metrics, users must write complex `group_left` joins—essentially reconstructing a relationship that should be built into the data model.
87
-
88
-
The Prometheus data model was designed for metrics: measurements that change over time, represented as (timestamp, value) pairs with identifying labels. Entities don't fit this model. They have:
89
-
90
-
-**Stable identity** (not a stream of values)
91
-
-**Mutable descriptions** (labels that change independently of any "sample")
92
-
-**Explicit lifecycle** (creation and termination events)
93
-
-**Correlation relationships** (many metrics belong to one entity)
90
+
Info metrics have served the community well as a **pragmatic convention** for representing entity information. They work, and thousands of dashboards and exporters rely on them. However, because Prometheus treats them as regular metrics rather than recognizing them as entity representations, several limitations emerge:
94
91
95
-
**This proposal introduces Entities as a first-class concept in Prometheus**, separate from metrics, with their own storage, lifecycle management, and query semantics. Info metrics will continue to work for backward compatibility, but new instrumentation and the OTel integration can use proper Entity semantics.
96
-
97
-
### The Current Workaround: Info Metrics as Gauges
98
-
99
-
Prometheus does not have a native Entity type. Instead, users follow a convention: create a gauge with an `_info` suffix, set its value to `1`, and encode metadata as labels.
1.**The value is a placeholder**: The `1` carries no information—it exists only because Prometheus's storage requires a numeric value for every series.
93
+
2.**Identity is conflated with description**: All labels are treated equally. There's no way to declare that `uid` uniquely identifies the pod while `node` is descriptive metadata that may change.
94
+
3.**Lifecycle is implicit**: When a pod is deleted and recreated, Prometheus sees label churn. There's no first-class representation of "this entity ended; a new one began."
95
+
4.**Correlation is manual**: To associate entity metadata with metrics, users must write complex `group_left` joins—reconstructing a relationship that should be understood by the system.
104
96
105
-
While OpenMetrics formally defines an Info type, the Prometheus text exposition format does not support it. This means:
106
-
- Info metrics consume storage for a constant value (`1`) that carries no information
107
-
- There's no semantic distinction between info metrics and regular gauges
108
-
- Query engines cannot optimize for the unique characteristics of metadata
97
+
What Prometheus needs is not a replacement for info metrics, but rather **recognition of Entities as a first-class concept**. Info metrics are already representing entities—this proposal gives Prometheus the semantics to understand what they represent.
109
98
110
99
### Joining Info Metrics Requires `group_left`
111
100
@@ -371,7 +360,7 @@ The following are explicitly out of scope for this proposal:
371
360
372
361
### Changing behavior for existing `*_info` Gauges
373
362
374
-
This proposal defines new semantics for Entities. Existing gauges with `_info` suffix will continue to work as gauges and joins will continue to work. Migration or automatic conversion is not in scope.
363
+
This proposal defines new semantics for Entities. Existing **gauges** with `_info` suffix will continue to work as gauges and joins will continue to work. Migration or automatic conversion is not in scope.
0 commit comments