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: docs/specs/om/open_metrics_spec_2_0.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,6 +113,7 @@ Labels are key-value pairs consisting of strings.
113
113
114
114
Label names beginning with two underscores are RESERVED and MUST NOT be used unless specified by this standard. Such Label names MAY be used in place of TYPE and UNIT metadata in cases where MetricFamilies' metadata might otherwise be conflicting, such as metric federation cases.
115
115
116
+
// MAYBE: Link to where we explain "UTF-8 metrics may reduce usability"
116
117
Label names SHOULD follow the restrictions in the ABNF section under the `label-name` section. Label names MAY be any quoted escaped UTF-8 string as described in the ABNF section. Be aware that exposing UTF-8 metrics may reduce usability.
117
118
118
119
Empty label values SHOULD be treated as if the label was not present.
@@ -121,26 +122,30 @@ Empty label values SHOULD be treated as if the label was not present.
121
122
122
123
A LabelSet MUST consist of Labels and MAY be empty. Label names MUST be unique within a LabelSet.
123
124
125
+
// TODO(dashpole): Sample
124
126
#### MetricPoint
125
127
128
+
// TODO(dashpole): Updating... (removed)
126
129
Each MetricPoint consists of a set of values, depending on the MetricFamily Type.
127
130
128
131
#### Exemplars
129
132
130
133
Exemplars are references to data outside of the MetricSet. A common use case are IDs of program traces.
131
134
132
-
Exemplars MUST consist of a LabelSet and a value, and MUST have a timestamp. The LabelSet SHOULD NOT contain any Label names included in the MetricPoint's LabelSet. The timestamp SHOULD NOT be after the MetricPoint's timestamp, if present, and SHOULD NOT be before the MetricPoint's start timestamp, if present.
135
+
Exemplars MUST consist of a LabelSet and a Number value, and MUST have a timestamp. The LabelSet SHOULD NOT contain any Label names included in the MetricPoint's LabelSet. The timestamp SHOULD be before or equal to the MetricPoint's timestamp, if present. The timestamp SHOULD be after or equal to the MetricPoint's start timestamp, if present.
133
136
134
-
The Exemplar's timestamp SHOULD be close to the point in time when the referenced data was created, but doesn't have to be exact. For example if getting an exact timestamp is costly, it is acceptable to use some external source or synthetic clock.
137
+
The Exemplar's timestamp SHOULD be close to the point when it was observed, but doesn't have to be exact. For example, if getting an exact timestamp is costly, it is acceptable to use some external source or an estimate.
135
138
136
139
When an exemplar references a [Trace Context](https://www.w3.org/TR/trace-context-2/), it SHOULD use the `trace_id` key for the [trace-id](https://www.w3.org/TR/trace-context-2/#traceparent-header) field, and the `span_id` key for the [`parent-id`](https://www.w3.org/TR/trace-context-2/#traceparent-header) field.
137
140
138
141
While there's no [hard limit](#size-limits) specified, Exemplar's LabelSet SHOULD NOT be used to transport large data like tracing span details or other event logging.
139
142
143
+
// TODO: "If you truncate data try to preserve trace id and span id"
140
144
Ingestors MAY truncate the Exemplar's LabelSet or discard Exemplars.
141
145
142
146
#### Metric
143
147
148
+
// TODO(dashpole) updating
144
149
Metrics are defined by a unique LabelSet within a MetricFamily. Metrics MUST contain a list of one or more MetricPoints. Metrics with the same name for a given MetricFamily SHOULD have the same set of label names in their LabelSet.
0 commit comments