diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/LabelSetSdk.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/LabelSetSdk.java index 1278f720e0c..d2967d8085d 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/LabelSetSdk.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/LabelSetSdk.java @@ -27,17 +27,17 @@ @AutoValue abstract class LabelSetSdk implements LabelSet { - private static final LabelSet EMPTY = + private static final LabelSetSdk EMPTY = new AutoValue_LabelSetSdk(Collections.emptyMap()); - static LabelSet create(Map labels) { + static LabelSetSdk create(Map labels) { if (labels == null || labels.isEmpty()) { return EMPTY; } return new AutoValue_LabelSetSdk(unmodifiableMap(labels)); } - static LabelSet create(String... keyValuePairs) { + static LabelSetSdk create(String... keyValuePairs) { if (keyValuePairs.length == 0) { return EMPTY; } diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdk.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdk.java index 89f92a77b8a..d924a4c8de0 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdk.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdk.java @@ -78,12 +78,12 @@ public BatchRecorder newBatchRecorder(LabelSet labelSet) { } @Override - public LabelSet createLabelSet(String... keyValuePairs) { + public LabelSetSdk createLabelSet(String... keyValuePairs) { return LabelSetSdk.create(keyValuePairs); } @Override - public LabelSet createLabelSet(Map labels) { + public LabelSetSdk createLabelSet(Map labels) { return LabelSetSdk.create(labels); } }