diff --git a/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java b/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java index d58d4276..4fa968de 100644 --- a/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java +++ b/exporters/metrics/src/main/java/com/google/cloud/opentelemetry/metric/MetricTranslator.java @@ -38,7 +38,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricDataType; import io.opentelemetry.sdk.metrics.data.SumData; -import java.nio.file.Paths; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; @@ -226,7 +225,7 @@ private static String mapMetricType(String instrumentName, String prefix) { return instrumentName; } } - return Paths.get(prefix, instrumentName).toString(); + return String.join("/", prefix, instrumentName); } private static Distribution.Exemplar mapExemplar(ExemplarData exemplar, String projectId) {