Skip to content

Commit 6986009

Browse files
committed
Restrict Prometheus strategy parsing to declared values
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 2cc649c commit 6986009

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

exporters/prometheus/src/main/java/io/opentelemetry/exporter/prometheus/internal/PrometheusComponentProvider.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,12 @@ public MetricReader create(DeclarativeConfigProperties config) {
8080

8181
private static TranslationStrategy parseTranslationStrategy(String value) {
8282
switch (value) {
83-
case "UnderscoreEscapingWithSuffixes":
8483
case "underscore_escaping_with_suffixes":
8584
return TranslationStrategy.UNDERSCORE_ESCAPING_WITH_SUFFIXES;
86-
case "UnderscoreEscapingWithoutSuffixes":
87-
case "UnderscoreEscapingWithoutSuffixes/Development":
88-
case "underscore_escaping_without_suffixes":
8985
case "underscore_escaping_without_suffixes/development":
9086
return TranslationStrategy.UNDERSCORE_ESCAPING_WITHOUT_SUFFIXES;
91-
case "NoUTF8EscapingWithSuffixes":
92-
case "NoUTF8EscapingWithSuffixes/Development":
93-
case "no_utf8_escaping_with_suffixes":
9487
case "no_utf8_escaping_with_suffixes/development":
9588
return TranslationStrategy.NO_UTF8_ESCAPING_WITH_SUFFIXES;
96-
case "NoTranslation":
97-
case "NoTranslation/Development":
98-
case "no_translation":
9989
case "no_translation/development":
10090
return TranslationStrategy.NO_TRANSLATION;
10191
default:

0 commit comments

Comments
 (0)