forked from open-telemetry/opentelemetry-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prometheus exporter convert instrumentation scope to otel_scope_info …
…metric (open-telemetry#3357) * prometheus exporter convert instrumentation scope to otel_scope_info metric Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com> * fix for commits Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com> * fix for ci failed Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com> * add multi scopes test Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com> * fix ci failed Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com> Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
- Loading branch information
1 parent
49b62ae
commit e8023fa
Showing
15 changed files
with
242 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# HELP foo_milliseconds_total a simple counter | ||
# TYPE foo_milliseconds_total counter | ||
foo_milliseconds_total{A="B",C="D",E="true",F="42"} 24.3 | ||
foo_milliseconds_total{A="D",C="B",E="true",F="42"} 5 | ||
foo_milliseconds_total{A="B",C="D",E="true",F="42",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 24.3 | ||
foo_milliseconds_total{A="D",C="B",E="true",F="42",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 5 | ||
# HELP otel_scope_info Instrumentation Scope metadata | ||
# TYPE otel_scope_info gauge | ||
otel_scope_info{otel_scope_name="testmeter",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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# HELP foo_total a simple counter | ||
# TYPE foo_total counter | ||
foo_total{A="B",C="D",E="true",F="42"} 24.3 | ||
foo_total{A="B",C="D",E="true",F="42",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 24.3 | ||
# HELP otel_scope_info Instrumentation Scope metadata | ||
# TYPE otel_scope_info gauge | ||
otel_scope_info{otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 1 | ||
# HELP target_info Target metadata | ||
# TYPE target_info gauge | ||
target_info{A="B",C="D",service_name="prometheus_test",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="latest"} 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# HELP foo_total a simple counter | ||
# TYPE foo_total counter | ||
foo_total{A="B",C="D",E="true",F="42"} 24.3 | ||
foo_total{A="B",C="D",E="true",F="42",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 24.3 | ||
# HELP otel_scope_info Instrumentation Scope metadata | ||
# TYPE otel_scope_info gauge | ||
otel_scope_info{otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 1 | ||
# HELP target_info Target metadata | ||
# TYPE target_info gauge | ||
target_info 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# HELP bar_ratio a fun little gauge | ||
# TYPE bar_ratio gauge | ||
bar_ratio{A="B",C="D"} .75 | ||
bar_ratio{A="B",C="D",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} .75 | ||
# HELP otel_scope_info Instrumentation Scope metadata | ||
# TYPE otel_scope_info gauge | ||
otel_scope_info{otel_scope_name="testmeter",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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
# HELP histogram_baz_bytes a very nice histogram | ||
# TYPE histogram_baz_bytes histogram | ||
histogram_baz_bytes_bucket{A="B",C="D",le="0"} 0 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="5"} 0 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="10"} 1 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="25"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="50"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="75"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="100"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="250"} 4 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="500"} 4 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="1000"} 4 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="+Inf"} 4 | ||
histogram_baz_bytes_sum{A="B",C="D"} 236 | ||
histogram_baz_bytes_count{A="B",C="D"} 4 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="0",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 0 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="5",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 0 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="10",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 1 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="25",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="50",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="75",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="100",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 2 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="250",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 4 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="500",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 4 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="1000",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 4 | ||
histogram_baz_bytes_bucket{A="B",C="D",le="+Inf",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 4 | ||
histogram_baz_bytes_sum{A="B",C="D",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 236 | ||
histogram_baz_bytes_count{A="B",C="D",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 4 | ||
# HELP otel_scope_info Instrumentation Scope metadata | ||
# TYPE otel_scope_info gauge | ||
otel_scope_info{otel_scope_name="testmeter",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 |
Oops, something went wrong.