Skip to content

Commit bc88072

Browse files
committed
address comments
Signed-off-by: David Ashpole <[email protected]>
1 parent dec6f78 commit bc88072

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

proposals/2024-09-25_metadata-labels.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ Add an option, `NoNameChanges` for the OTLP translation strategy. When enabled,
9898

9999
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.
100100

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`.
102105

103106
Writing queries that include the type and unit would be recommended as a best-practice by the community.
104107

@@ -111,9 +114,9 @@ For example:
111114

112115
This solution is not chosen because:
113116

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?
117120
* Mitigation: users just stay with `{foo_seconds~seconds.histogram}`
118121
* Users might be surprised by, or dislike the additional suffixes and delimiters in the metric name results
119122
* Mitigation: Opt-in for query engines?

0 commit comments

Comments
 (0)