[prometheus] Update links to openmetrics to reference the v1.0.0 release (#6029)
This commit is contained in:
parent
8e6d814f0f
commit
c94c422e31
|
|
@ -150,7 +150,7 @@ Released 2022-Sep-29
|
||||||
([#3651](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3651))
|
([#3651](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3651))
|
||||||
|
|
||||||
* Added `"# EOF\n"` ending following the [OpenMetrics
|
* Added `"# EOF\n"` ending following the [OpenMetrics
|
||||||
specification](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md)
|
specification](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md)
|
||||||
([#3654](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3654))
|
([#3654](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3654))
|
||||||
|
|
||||||
## 1.4.0-alpha.2
|
## 1.4.0-alpha.2
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ Released 2022-Sep-29
|
||||||
([#3651](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3651))
|
([#3651](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3651))
|
||||||
|
|
||||||
* Added `"# EOF\n"` ending following the [OpenMetrics
|
* Added `"# EOF\n"` ending following the [OpenMetrics
|
||||||
specification](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md)
|
specification](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md)
|
||||||
([#3654](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3654))
|
([#3654](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3654))
|
||||||
|
|
||||||
## 1.4.0-alpha.2
|
## 1.4.0-alpha.2
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ internal sealed class PrometheusMetric
|
||||||
sanitizedUnit = GetUnit(unit);
|
sanitizedUnit = GetUnit(unit);
|
||||||
|
|
||||||
// The resulting unit SHOULD be added to the metric as
|
// The resulting unit SHOULD be added to the metric as
|
||||||
// [OpenMetrics UNIT metadata](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#metricfamily)
|
// [OpenMetrics UNIT metadata](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#metricfamily)
|
||||||
// and as a suffix to the metric name. The unit suffix comes before any type-specific suffixes.
|
// and as a suffix to the metric name. The unit suffix comes before any type-specific suffixes.
|
||||||
// https://github.com/open-telemetry/opentelemetry-specification/blob/3dfb383fe583e3b74a2365c5a1d90256b273ee76/specification/compatibility/prometheus_and_openmetrics.md#metric-metadata-1
|
// https://github.com/open-telemetry/opentelemetry-specification/blob/3dfb383fe583e3b74a2365c5a1d90256b273ee76/specification/compatibility/prometheus_and_openmetrics.md#metric-metadata-1
|
||||||
if (!sanitizedName.EndsWith(sanitizedUnit))
|
if (!sanitizedName.EndsWith(sanitizedUnit))
|
||||||
|
|
@ -57,14 +57,14 @@ internal sealed class PrometheusMetric
|
||||||
}
|
}
|
||||||
|
|
||||||
// For counters requested using OpenMetrics format, the MetricFamily name MUST be suffixed with '_total', regardless of the setting to disable the 'total' suffix.
|
// For counters requested using OpenMetrics format, the MetricFamily name MUST be suffixed with '_total', regardless of the setting to disable the 'total' suffix.
|
||||||
// https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#counter-1
|
// https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#counter-1
|
||||||
if (type == PrometheusType.Counter && !openMetricsName.EndsWith("_total"))
|
if (type == PrometheusType.Counter && !openMetricsName.EndsWith("_total"))
|
||||||
{
|
{
|
||||||
openMetricsName += "_total";
|
openMetricsName += "_total";
|
||||||
}
|
}
|
||||||
|
|
||||||
// In OpenMetrics format, the UNIT, TYPE and HELP metadata must be suffixed with the unit (handled above), and not the '_total' suffix, as in the case for counters.
|
// In OpenMetrics format, the UNIT, TYPE and HELP metadata must be suffixed with the unit (handled above), and not the '_total' suffix, as in the case for counters.
|
||||||
// https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#unit
|
// https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#unit
|
||||||
var openMetricsMetadataName = type == PrometheusType.Counter
|
var openMetricsMetadataName = type == PrometheusType.Counter
|
||||||
? SanitizeOpenMetricsName(openMetricsName)
|
? SanitizeOpenMetricsName(openMetricsName)
|
||||||
: sanitizedName;
|
: sanitizedName;
|
||||||
|
|
@ -241,7 +241,7 @@ internal sealed class PrometheusMetric
|
||||||
// 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/semantic-conventions/blob/main/docs/general/metrics.md#instrument-units)
|
// (See also https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metrics.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
|
||||||
private static string MapUnit(ReadOnlySpan<char> unit)
|
private static string MapUnit(ReadOnlySpan<char> unit)
|
||||||
{
|
{
|
||||||
return unit switch
|
return unit switch
|
||||||
|
|
|
||||||
|
|
@ -430,7 +430,7 @@ message HistogramDataPoint {
|
||||||
// events, and is assumed to be monotonic over the values of these events.
|
// events, and is assumed to be monotonic over the values of these events.
|
||||||
// Negative events *can* be recorded, but sum should not be filled out when
|
// Negative events *can* be recorded, but sum should not be filled out when
|
||||||
// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
||||||
// see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
|
// see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram
|
||||||
optional double sum = 5;
|
optional double sum = 5;
|
||||||
|
|
||||||
// bucket_counts is an optional field contains the count values of histogram
|
// bucket_counts is an optional field contains the count values of histogram
|
||||||
|
|
@ -509,7 +509,7 @@ message ExponentialHistogramDataPoint {
|
||||||
// events, and is assumed to be monotonic over the values of these events.
|
// events, and is assumed to be monotonic over the values of these events.
|
||||||
// Negative events *can* be recorded, but sum should not be filled out when
|
// Negative events *can* be recorded, but sum should not be filled out when
|
||||||
// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
||||||
// see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
|
// see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram
|
||||||
optional double sum = 5;
|
optional double sum = 5;
|
||||||
|
|
||||||
// scale describes the resolution of the histogram. Boundaries are
|
// scale describes the resolution of the histogram. Boundaries are
|
||||||
|
|
@ -622,7 +622,7 @@ message SummaryDataPoint {
|
||||||
// events, and is assumed to be monotonic over the values of these events.
|
// events, and is assumed to be monotonic over the values of these events.
|
||||||
// Negative events *can* be recorded, but sum should not be filled out when
|
// Negative events *can* be recorded, but sum should not be filled out when
|
||||||
// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
|
||||||
// see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#summary
|
// see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary
|
||||||
double sum = 5;
|
double sum = 5;
|
||||||
|
|
||||||
// Represents the value at a given quantile of a distribution.
|
// Represents the value at a given quantile of a distribution.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue