Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus: Add otel_scope_schema_url and otel_scope_[attribute] labels #5947

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions exporters/prometheus/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (

scopeNameLabel = "otel_scope_name"
scopeVersionLabel = "otel_scope_version"
scopeSchemaLabel = "otel_scope_schema_url"

traceIDExemplarKey = "trace_id"
spanIDExemplarKey = "span_id"
Expand Down Expand Up @@ -205,8 +206,15 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {

ch <- scopeInfo

kv.keys = append(kv.keys, scopeNameLabel, scopeVersionLabel)
kv.vals = append(kv.vals, scopeMetrics.Scope.Name, scopeMetrics.Scope.Version)
kv.keys = append(kv.keys, scopeNameLabel, scopeVersionLabel, scopeSchemaLabel)
kv.vals = append(kv.vals, scopeMetrics.Scope.Name, scopeMetrics.Scope.Version, scopeMetrics.Scope.SchemaURL)

attrKeys, attrVals := getAttrs(scopeMetrics.Scope.Attributes)
for i := range attrKeys {
attrKeys[i] = "otel_scope_" + attrKeys[i]
Copy link
Member Author

@pellared pellared Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about also adding otel_scope_ prefix for the otel_scope_info metric, but I feel that this would be a breaking change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. There isn't really any purpose to the otel_scope_info metric anymore, since it duplicates labels already available on metrics.

Copy link
Member Author

@pellared pellared Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about backwards compatibility for OTel Collector Prometheus receiver? Jot needed as it is not stable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use an env var to gate the feature and allow migrating from otel_scope_info to otel_scope_. We probably shouldn't produce both at once.

}
kv.keys = append(kv.keys, attrKeys...)
kv.vals = append(kv.vals, attrVals...)
}

kv.keys = append(kv.keys, c.resourceKeyVals.keys...)
Expand Down Expand Up @@ -360,6 +368,7 @@ func createScopeInfoMetric(scope instrumentation.Scope) (prometheus.Metric, erro
attrs = append(attrs, scope.Attributes.ToSlice()...)
attrs = append(attrs, attribute.String(scopeNameLabel, scope.Name))
attrs = append(attrs, attribute.String(scopeVersionLabel, scope.Version))
attrs = append(attrs, attribute.String(scopeSchemaLabel, scope.SchemaURL))

keys, values := getAttrs(attribute.NewSet(attrs...))
desc := prometheus.NewDesc(scopeInfoMetricName, scopeInfoDescription, keys, nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# HELP bar_bytes_total meter a bar
# TYPE bar_bytes_total counter
bar_bytes_total{otel_scope_name="ma",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes_total{otel_scope_name="mb",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes_total{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes_total{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
# HELP otel_scope_info Instrumentation Scope metadata
# TYPE otel_scope_info gauge
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
# HELP target_info Target metadata
# TYPE target_info gauge
target_info{service_name="prometheus_test",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="latest"} 1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# HELP bar_bytes_total meter b bar
# TYPE bar_bytes_total counter
bar_bytes_total{otel_scope_name="ma",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes_total{otel_scope_name="mb",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes_total{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes_total{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
# HELP otel_scope_info Instrumentation Scope metadata
# TYPE otel_scope_info gauge
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
# HELP target_info Target metadata
# TYPE target_info gauge
target_info{service_name="prometheus_test",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="latest"} 1
76 changes: 38 additions & 38 deletions exporters/prometheus/testdata/conflict_help_two_histograms_1.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# HELP bar_bytes meter a bar
# TYPE bar_bytes histogram
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
# HELP otel_scope_info Instrumentation Scope metadata
# TYPE otel_scope_info gauge
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
# HELP target_info Target metadata
# TYPE target_info gauge
target_info{service_name="prometheus_test",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="latest"} 1
76 changes: 38 additions & 38 deletions exporters/prometheus/testdata/conflict_help_two_histograms_2.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# HELP bar_bytes meter b bar
# TYPE bar_bytes histogram
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="0",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="0",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="5",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="10",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="25",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="50",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="75",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 0
bar_bytes_bucket{A="B",le="100",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="250",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="750",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="1000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="2500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="5000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="7500",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="10000",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_bucket{A="B",le="+Inf",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
bar_bytes_sum{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 100
bar_bytes_count{A="B",otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
# HELP otel_scope_info Instrumentation Scope metadata
# TYPE otel_scope_info gauge
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
# HELP target_info Target metadata
# TYPE target_info gauge
target_info{service_name="prometheus_test",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="latest"} 1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# HELP bar_bytes meter a bar
# TYPE bar_bytes gauge
bar_bytes{otel_scope_name="ma",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes{otel_scope_name="mb",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
bar_bytes{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0",type="bar"} 100
# HELP otel_scope_info Instrumentation Scope metadata
# TYPE otel_scope_info gauge
otel_scope_info{otel_scope_name="ma",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="ma",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
otel_scope_info{otel_scope_name="mb",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 1
# HELP target_info Target metadata
# TYPE target_info gauge
target_info{service_name="prometheus_test",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="latest"} 1
Loading
Loading