mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
update links to openmetrics to reference the v1.0.0 release
Signed-off-by: David Ashpole <dashpole@google.com>
This commit is contained in:
parent
7802ca263d
commit
953a873342
|
@ -15,7 +15,7 @@ They may be enabled by default in future versions.
|
||||||
|
|
||||||
`--enable-feature=exemplar-storage`
|
`--enable-feature=exemplar-storage`
|
||||||
|
|
||||||
[OpenMetrics](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars) introduces the ability for scrape targets to add exemplars to certain metrics. Exemplars are references to data outside of the MetricSet. A common use case are IDs of program traces.
|
[OpenMetrics](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#exemplars) introduces the ability for scrape targets to add exemplars to certain metrics. Exemplars are references to data outside of the MetricSet. A common use case are IDs of program traces.
|
||||||
|
|
||||||
Exemplar storage is implemented as a fixed size circular buffer that stores exemplars in memory for all series. Enabling this feature will enable the storage of exemplars scraped by Prometheus. The config file block [storage](configuration/configuration.md#configuration-file)/[exemplars](configuration/configuration.md#exemplars) can be used to control the size of circular buffer by # of exemplars. An exemplar with just a `trace_id=<jaeger-trace-id>` uses roughly 100 bytes of memory via the in-memory exemplar storage. If the exemplar storage is enabled, we will also append the exemplars to WAL for local persistence (for WAL duration).
|
Exemplar storage is implemented as a fixed size circular buffer that stores exemplars in memory for all series. Enabling this feature will enable the storage of exemplars scraped by Prometheus. The config file block [storage](configuration/configuration.md#configuration-file)/[exemplars](configuration/configuration.md#exemplars) can be used to control the size of circular buffer by # of exemplars. An exemplar with just a `trace_id=<jaeger-trace-id>` uses roughly 100 bytes of memory via the in-memory exemplar storage. If the exemplar storage is enabled, we will also append the exemplars to WAL for local persistence (for WAL duration).
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ import "github.com/prometheus/prometheus/model/labels"
|
||||||
// ExemplarMaxLabelSetLength is defined by OpenMetrics: "The combined length of
|
// ExemplarMaxLabelSetLength is defined by OpenMetrics: "The combined length of
|
||||||
// the label names and values of an Exemplar's LabelSet MUST NOT exceed 128
|
// the label names and values of an Exemplar's LabelSet MUST NOT exceed 128
|
||||||
// UTF-8 characters."
|
// UTF-8 characters."
|
||||||
// https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars
|
// https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#exemplars
|
||||||
const ExemplarMaxLabelSetLength = 128
|
const ExemplarMaxLabelSetLength = 128
|
||||||
|
|
||||||
// Exemplar is additional information associated with a time series.
|
// Exemplar is additional information associated with a time series.
|
||||||
|
|
|
@ -337,7 +337,7 @@ func (p *OpenMetricsParser) CreatedTimestamp() *int64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// All timestamps in OpenMetrics are Unix Epoch in seconds. Convert to milliseconds.
|
// All timestamps in OpenMetrics are Unix Epoch in seconds. Convert to milliseconds.
|
||||||
// https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#timestamps
|
// https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#timestamps
|
||||||
ct := int64(p.val * 1000.0)
|
ct := int64(p.val * 1000.0)
|
||||||
p.setCTParseValues(ct, currHash, currName, true)
|
p.setCTParseValues(ct, currHash, currName, true)
|
||||||
return &ct
|
return &ct
|
||||||
|
|
|
@ -836,7 +836,7 @@ scrape_configs:
|
||||||
require.Len(t, createdSeriesSamples, 1)
|
require.Len(t, createdSeriesSamples, 1)
|
||||||
// Conversion taken from common/expfmt.writeOpenMetricsFloat.
|
// Conversion taken from common/expfmt.writeOpenMetricsFloat.
|
||||||
// We don't check the ct timestamp as explicit ts was not implemented in expfmt.Encoder,
|
// We don't check the ct timestamp as explicit ts was not implemented in expfmt.Encoder,
|
||||||
// but exists in OM https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#:~:text=An%20example%20with%20a%20Metric%20with%20no%20labels%2C%20and%20a%20MetricPoint%20with%20a%20timestamp%20and%20a%20created
|
// but exists in OM https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#:~:text=An%20example%20with%20a%20Metric%20with%20no%20labels%2C%20and%20a%20MetricPoint%20with%20a%20timestamp%20and%20a%20created
|
||||||
// We can implement this, but we want to potentially get rid of OM 1.0 CT lines
|
// We can implement this, but we want to potentially get rid of OM 1.0 CT lines
|
||||||
require.Equal(t, float64(timestamppb.New(ctTs).AsTime().UnixNano())/1e9, createdSeriesSamples[0].f)
|
require.Equal(t, float64(timestamppb.New(ctTs).AsTime().UnixNano())/1e9, createdSeriesSamples[0].f)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -30,7 +30,7 @@ import (
|
||||||
// OTLP metrics use the c/s notation as specified at https://ucum.org/ucum.html
|
// OTLP metrics use the c/s notation as specified at https://ucum.org/ucum.html
|
||||||
// (See also https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/README.md#instrument-units)
|
// (See also https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/README.md#instrument-units)
|
||||||
// Prometheus best practices for units: https://prometheus.io/docs/practices/naming/#base-units
|
// Prometheus best practices for units: https://prometheus.io/docs/practices/naming/#base-units
|
||||||
// OpenMetrics specification for units: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#units-and-base-units
|
// OpenMetrics specification for units: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#units-and-base-units
|
||||||
var unitMap = map[string]string{
|
var unitMap = map[string]string{
|
||||||
// Time
|
// Time
|
||||||
"d": "days",
|
"d": "days",
|
||||||
|
|
|
@ -50,7 +50,7 @@ const (
|
||||||
createdSuffix = "_created"
|
createdSuffix = "_created"
|
||||||
// maxExemplarRunes is the maximum number of UTF-8 exemplar characters
|
// maxExemplarRunes is the maximum number of UTF-8 exemplar characters
|
||||||
// according to the prometheus specification
|
// according to the prometheus specification
|
||||||
// https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars
|
// https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#exemplars
|
||||||
maxExemplarRunes = 128
|
maxExemplarRunes = 128
|
||||||
// Trace and Span id keys are defined as part of the spec:
|
// Trace and Span id keys are defined as part of the spec:
|
||||||
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification%2Fmetrics%2Fdatamodel.md#exemplars-2
|
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification%2Fmetrics%2Fdatamodel.md#exemplars-2
|
||||||
|
|
|
@ -126,7 +126,7 @@ The first row stores the starting id and the starting timestamp.
|
||||||
Series reference and timestamp are encoded as deltas w.r.t the first exemplar.
|
Series reference and timestamp are encoded as deltas w.r.t the first exemplar.
|
||||||
The first exemplar record begins at the second row.
|
The first exemplar record begins at the second row.
|
||||||
|
|
||||||
See: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars
|
See: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#exemplars
|
||||||
|
|
||||||
```
|
```
|
||||||
┌──────────────────────────────────────────────────────────────────┐
|
┌──────────────────────────────────────────────────────────────────┐
|
||||||
|
|
Loading…
Reference in a new issue