Skip to content

Commit 5290cb3

Browse files
committed
Adapted test for 0.60
1 parent a66d2ba commit 5290cb3

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

exporters/prometheus/exporter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ func TestPrometheusExporter(t *testing.T) {
230230
{
231231
name: "counter with unit '1'",
232232
expectedFile: "testdata/counter_with_unit_1.txt",
233-
options: []Option{},
233+
strategy: otlptranslator.UnderscoreEscapingWithSuffixes,
234234
recordMetrics: func(ctx context.Context, meter otelmetric.Meter) {
235235
opt := otelmetric.WithAttributes(
236236
attribute.Key("A").String("B"),
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
# HELP foo_ratio_total a simple counter with unit 1
2-
# TYPE foo_ratio_total counter
3-
foo_ratio_total{A="B",C="D",E="true",F="42",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 24
4-
foo_ratio_total{A="D",C="B",E="true",F="42",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 5
5-
# HELP otel_scope_info Instrumentation Scope metadata
6-
# TYPE otel_scope_info gauge
7-
otel_scope_info{fizz="buzz",otel_scope_name="testmeter",otel_scope_version="v0.1.0"} 1
1+
# HELP foo_total a simple counter with unit 1
2+
# TYPE foo_total counter
3+
foo_total{A="B",C="D",E="true",F="42",otel_scope_fizz="buzz",otel_scope_name="testmeter",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 24
4+
foo_total{A="D",C="B",E="true",F="42",otel_scope_fizz="buzz",otel_scope_name="testmeter",otel_scope_schema_url="",otel_scope_version="v0.1.0"} 5
85
# HELP target_info Target metadata
96
# TYPE target_info gauge
107
target_info{service_name="prometheus_test",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="latest"} 1

0 commit comments

Comments
 (0)