Skip to content

Commit 1f6e6cf

Browse files
committed
comment
1 parent c1e3a9f commit 1f6e6cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/Otel2PrometheusConverter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ private static MetricMetadata convertMetadata(MetricData metricData) {
555555
if (unit != null && !name.endsWith(unit.toString())) {
556556
name = name + "_" + unit;
557557
}
558-
// Repeated __ are not allowed according to spec, although this is allowed in prometheus
558+
// Repeated __ are discouraged according to spec, although this is allowed in prometheus, see
559+
// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#metric-metadata-1
559560
while (name.contains("__")) {
560561
name = name.replace("__", "_");
561562
}

0 commit comments

Comments
 (0)