use alternative translator

This commit is contained in:
pascal
2026-04-09 13:25:27 +02:00
parent fd28178cc6
commit 4b5e39c574
5 changed files with 9 additions and 5 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/prometheus/otlptranslator"
"go.opentelemetry.io/otel/exporters/prometheus"
"go.opentelemetry.io/otel/sdk/metric"
@@ -52,7 +53,7 @@ func TestMetrics_RoundTripper(t *testing.T) {
}
exporter, err := prometheus.New(
prometheus.WithoutUnits(),
prometheus.WithTranslationStrategy(otlptranslator.UnderscoreEscapingWithoutSuffixes),
)
if err != nil {
t.Fatalf("create prometheus exporter: %v", err)