Skip to content

Commit

Permalink
chore: remove unit suffix for unit 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys3 committed May 24, 2023
1 parent 46f2ce5 commit 794c498
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion exporters/prometheus/exporter.go
Expand Up @@ -313,7 +313,6 @@ func sanitizeRune(r rune) rune {
}

var unitSuffixes = map[string]string{
"1": "_ratio",
"By": "_bytes",
"ms": "_milliseconds",
}
Expand Down
6 changes: 3 additions & 3 deletions exporters/prometheus/testdata/gauge.txt
@@ -1,6 +1,6 @@
# HELP bar_ratio a fun little gauge
# TYPE bar_ratio gauge
bar_ratio{A="B",C="D",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} .75
# HELP bar a fun little gauge
# TYPE bar gauge
bar{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
Expand Down
6 changes: 3 additions & 3 deletions exporters/prometheus/testdata/without_scope_info.txt
@@ -1,6 +1,6 @@
# HELP bar_ratio a fun little gauge
# TYPE bar_ratio gauge
bar_ratio{A="B",C="D"} 1
# HELP bar a fun little gauge
# TYPE bar gauge
bar{A="B",C="D"} 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

0 comments on commit 794c498

Please sign in to comment.