Skip to content

Commit

Permalink
prometheus: Add otel_scope_schema_url and otel_scope_[attribute] labels
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Nov 7, 2024
1 parent ff07838 commit 417330c
Show file tree
Hide file tree
Showing 32 changed files with 288 additions and 279 deletions.
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]
}
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

0 comments on commit 417330c

Please sign in to comment.