Skip to content

Commit 69f189f

Browse files
authored
prometheus: Add otel_scope_schema_url and otel_scope_[attribute] labels (open-telemetry#5947)
Fixes open-telemetry#5846 Towards open-telemetry/opentelemetry-specification#4223 (first two points from open-telemetry/opentelemetry-specification#4223 (comment)) - Add instrumentation scope schema URL as `otel_scope_schema_url` label to exported metrics - Add instrumentation scope attributes as `otel_scope_[attribute]` labels to exported metrics Side notes: - The exporter does not seem to work correctly if the end user adds e.g. an `otel_scope_name` attribute. I think the exporter should ignore all attributes with names that have prefix `otel_scope_`. This scenario is also not covered by the spec. I think it may be covered by a separate PR and issue. - Removal of `otel_scope_info` metric would be handled as a separate PR. open-telemetry#6770
1 parent 1dca080 commit 69f189f

35 files changed

+254
-243
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1414
The package contains semantic conventions from the `v1.33.0` version of the OpenTelemetry Semantic Conventions.
1515
See the [migration documentation](./semconv/v1.33.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.32.0.`(#6799)
1616
- The `go.opentelemetry.io/otel/semconv/v1.34.0` package.
17-
The package contains semantic conventions from the `v1.34.0` version of the OpenTelemetry Semantic Conventions. (#TBD)
17+
The package contains semantic conventions from the `v1.34.0` version of the OpenTelemetry Semantic Conventions. (#6812)
18+
- Add metric's schema URL as `otel_scope_schema_url` label in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
19+
- Add metric's scope attributes as `otel_scope_[attribute]` labels in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
1820

1921
<!-- Released section -->
2022
<!-- Don't change this section unless doing release -->

exporters/prometheus/exporter.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ const (
3434
scopeInfoMetricName = "otel_scope_info"
3535
scopeInfoDescription = "Instrumentation Scope metadata"
3636

37-
scopeNameLabel = "otel_scope_name"
38-
scopeVersionLabel = "otel_scope_version"
37+
scopeLabelPrefix = "otel_scope_"
38+
scopeNameLabel = scopeLabelPrefix + "name"
39+
scopeVersionLabel = scopeLabelPrefix + "version"
40+
scopeSchemaLabel = scopeLabelPrefix + "schema_url"
3941

4042
traceIDExemplarKey = "trace_id"
4143
spanIDExemplarKey = "span_id"
@@ -214,8 +216,15 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
214216

215217
ch <- scopeInfo
216218

217-
kv.keys = append(kv.keys, scopeNameLabel, scopeVersionLabel)
218-
kv.vals = append(kv.vals, scopeMetrics.Scope.Name, scopeMetrics.Scope.Version)
219+
kv.keys = append(kv.keys, scopeNameLabel, scopeVersionLabel, scopeSchemaLabel)
220+
kv.vals = append(kv.vals, scopeMetrics.Scope.Name, scopeMetrics.Scope.Version, scopeMetrics.Scope.SchemaURL)
221+
222+
attrKeys, attrVals := getAttrs(scopeMetrics.Scope.Attributes)
223+
for i := range attrKeys {
224+
attrKeys[i] = scopeLabelPrefix + attrKeys[i]
225+
}
226+
kv.keys = append(kv.keys, attrKeys...)
227+
kv.vals = append(kv.vals, attrVals...)
219228
}
220229

221230
kv.keys = append(kv.keys, c.resourceKeyVals.keys...)

exporters/prometheus/testdata/conflict_help_two_counters_1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# HELP bar_bytes_total meter a bar
22
# TYPE bar_bytes_total counter
3-
bar_bytes_total{otel_scope_name="ma",otel_scope_version="v0.1.0",type="bar"} 100
4-
bar_bytes_total{otel_scope_name="mb",otel_scope_version="v0.1.0",type="bar"} 100
3+
bar_bytes_total{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
4+
bar_bytes_total{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
55
# HELP otel_scope_info Instrumentation Scope metadata
66
# TYPE otel_scope_info gauge
77
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_help_two_counters_2.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# HELP bar_bytes_total meter b bar
22
# TYPE bar_bytes_total counter
3-
bar_bytes_total{otel_scope_name="ma",otel_scope_version="v0.1.0",type="bar"} 100
4-
bar_bytes_total{otel_scope_name="mb",otel_scope_version="v0.1.0",type="bar"} 100
3+
bar_bytes_total{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
4+
bar_bytes_total{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
55
# HELP otel_scope_info Instrumentation Scope metadata
66
# TYPE otel_scope_info gauge
77
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_help_two_histograms_1.txt

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
# HELP bar_bytes meter a bar
22
# TYPE bar_bytes histogram
3-
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
4-
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
5-
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
6-
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
7-
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
8-
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
9-
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
10-
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
11-
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
12-
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
13-
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
14-
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
15-
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
16-
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
17-
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
18-
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
19-
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 100
20-
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
21-
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
22-
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
23-
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
24-
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
25-
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
26-
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
27-
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
28-
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
29-
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
30-
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
31-
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
32-
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
33-
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
34-
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
35-
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
36-
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
37-
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 100
38-
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
3+
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
4+
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
5+
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
6+
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
7+
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
8+
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
9+
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
10+
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
11+
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
12+
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
13+
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
14+
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
15+
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
16+
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
17+
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
18+
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
19+
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
20+
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
21+
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
22+
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
23+
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
24+
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
25+
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
26+
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
27+
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
28+
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
29+
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
30+
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
31+
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
32+
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
33+
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
34+
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
35+
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
36+
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
37+
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
38+
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
3939
# HELP otel_scope_info Instrumentation Scope metadata
4040
# TYPE otel_scope_info gauge
4141
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_help_two_histograms_2.txt

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
# HELP bar_bytes meter b bar
22
# TYPE bar_bytes histogram
3-
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
4-
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
5-
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
6-
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
7-
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
8-
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
9-
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
10-
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
11-
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
12-
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
13-
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
14-
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
15-
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
16-
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
17-
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
18-
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
19-
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 100
20-
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
21-
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
22-
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
23-
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
24-
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
25-
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
26-
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
27-
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
28-
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
29-
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
30-
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
31-
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
32-
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
33-
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
34-
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
35-
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
36-
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
37-
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 100
38-
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
3+
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
4+
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
5+
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
6+
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
7+
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
8+
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
9+
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
10+
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
11+
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
12+
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
13+
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
14+
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
15+
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
16+
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
17+
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
18+
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
19+
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
20+
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
21+
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
22+
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
23+
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
24+
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
25+
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
26+
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
27+
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
28+
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
29+
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
30+
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
31+
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
32+
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
33+
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
34+
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
35+
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
36+
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
37+
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
38+
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
3939
# HELP otel_scope_info Instrumentation Scope metadata
4040
# TYPE otel_scope_info gauge
4141
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_help_two_updowncounters_1.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# HELP bar_bytes meter a bar
22
# TYPE bar_bytes gauge
3-
bar_bytes{otel_scope_name="ma",otel_scope_version="v0.1.0",type="bar"} 100
4-
bar_bytes{otel_scope_name="mb",otel_scope_version="v0.1.0",type="bar"} 100
3+
bar_bytes{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
4+
bar_bytes{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
55
# HELP otel_scope_info Instrumentation Scope metadata
66
# TYPE otel_scope_info gauge
77
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_help_two_updowncounters_2.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# HELP bar_bytes meter b bar
22
# TYPE bar_bytes gauge
3-
bar_bytes{otel_scope_name="ma",otel_scope_version="v0.1.0",type="bar"} 100
4-
bar_bytes{otel_scope_name="mb",otel_scope_version="v0.1.0",type="bar"} 100
3+
bar_bytes{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
4+
bar_bytes{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
55
# HELP otel_scope_info Instrumentation Scope metadata
66
# TYPE otel_scope_info gauge
77
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_type_counter_and_updowncounter_1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HELP foo_total meter foo
22
# TYPE foo_total counter
3-
foo_total{otel_scope_name="ma",otel_scope_version="v0.1.0",type="foo"} 100
3+
foo_total{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="foo"} 100
44
# HELP otel_scope_info Instrumentation Scope metadata
55
# TYPE otel_scope_info gauge
66
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_type_counter_and_updowncounter_2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HELP foo_total meter foo
22
# TYPE foo_total gauge
3-
foo_total{otel_scope_name="ma",otel_scope_version="v0.1.0",type="foo"} 100
3+
foo_total{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="foo"} 100
44
# HELP otel_scope_info Instrumentation Scope metadata
55
# TYPE otel_scope_info gauge
66
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

exporters/prometheus/testdata/conflict_type_histogram_and_updowncounter_1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HELP foo_bytes meter gauge foo
22
# TYPE foo_bytes gauge
3-
foo_bytes{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 100
3+
foo_bytes{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
44
# HELP otel_scope_info Instrumentation Scope metadata
55
# TYPE otel_scope_info gauge
66
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1

0 commit comments

Comments
 (0)