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/2024-09-25_metadata-labels.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,10 @@ Add an option, `NoNameChanges` for the OTLP translation strategy. When enabled,
98
98
99
99
Similar to suffixes of _<unit> and _<type/total> but make it an explicit suffix using a delimiter not currently permitted in metric names. Specifying suffixes is optional when querying for a metric. When the type or unit suffix is omitted from a query, it would (design TBD) return results which include any type or unit suffix which exists for that name.
100
100
101
-
NOTE: `~` for units and `.` for type is just one example, there might be better operators/characters to use.
101
+
NOTES:
102
+
103
+
*`~` for units and `.` for type is just one example, there might be better operators/characters to use.
104
+
* This proposal is fully compatible with the proposal above. `http_request_duration{__unit__="seconds", __type__="histogram"}` could just be another syntax for `http_request_duration~seconds.histogram`. It would make it much easier to add units and/or types to the metric name, so it would address the concern that you cannot see the unit and type anymore by looking at a PromQL expression without supporting tooling. If we allowed `.total` as an alias of `.counter`, we would have very little visible change. `http_requests_total` would become `http_requests.total`.
102
105
103
106
Writing queries that include the type and unit would be recommended as a best-practice by the community.
104
107
@@ -111,9 +114,9 @@ For example:
111
114
112
115
This solution is not chosen because:
113
116
114
-
*Requires PromQL changes (intrusive), touches on “dot” operator ideas.
115
-
* Adding suffixes outside of quotes looks strange: `{“http.server.duration”~seconds.histogram}`
116
-
* Rolling this out would be breaking for existing Prometheus users: E.g. `{foo_seconds}` becomes `{foo~seconds.histogram}`. Could this be part of OM 2.0?
117
+
*Adding suffixes outside of quotes looks strange: `{“http.server.duration”~seconds.histogram}`.
118
+
* Alternatives: `{“http.server.duration”}~seconds.histogram` or `{“http.server.duration”}{seconds,histogram}`
119
+
* Rolling this out may be breaking for existing Prometheus users: E.g. `{foo_seconds}` becomes either `{foo~seconds.histogram}` or `{foo_seconds~seconds.histogram}`. Could this be part of OM 2.0?
117
120
* Mitigation: users just stay with `{foo_seconds~seconds.histogram}`
118
121
* Users might be surprised by, or dislike the additional suffixes and delimiters in the metric name results
0 commit comments