From 69f811484327f7cdd58fe20dee53fa81c215b66c Mon Sep 17 00:00:00 2001 From: jwatson Date: Tue, 14 Jul 2020 13:12:21 -0700 Subject: [PATCH] move the ViewRegistry up one package, and clean up the visibility of other classes --- .../io/opentelemetry/sdk/metrics/TestSdk.java | 1 - .../io/opentelemetry/sdk/metrics/Batcher.java | 2 +- .../opentelemetry/sdk/metrics/Batchers.java | 8 ++--- .../sdk/metrics/InstrumentDescriptor.java | 6 ++-- .../sdk/metrics/MeterProviderSharedState.java | 4 +-- .../opentelemetry/sdk/metrics/MeterSdk.java | 1 - .../sdk/metrics/MeterSdkProvider.java | 1 - .../sdk/metrics/MeterSharedState.java | 2 +- .../sdk/metrics/{view => }/ViewRegistry.java | 31 ++++++++++--------- .../sdk/metrics/BatchRecorderSdkTest.java | 1 - .../sdk/metrics/DoubleCounterSdkTest.java | 1 - .../sdk/metrics/DoubleSumObserverSdkTest.java | 1 - .../metrics/DoubleUpDownCounterSdkTest.java | 1 - .../DoubleUpDownSumObserverSdkTest.java | 1 - .../metrics/DoubleValueObserverSdkTest.java | 1 - .../metrics/DoubleValueRecorderSdkTest.java | 1 - .../sdk/metrics/LongCounterSdkTest.java | 1 - .../sdk/metrics/LongSumObserverSdkTest.java | 1 - .../sdk/metrics/LongUpDownCounterSdkTest.java | 1 - .../metrics/LongUpDownSumObserverSdkTest.java | 1 - .../sdk/metrics/LongValueObserverSdkTest.java | 1 - .../sdk/metrics/LongValueRecorderSdkTest.java | 1 - .../sdk/metrics/MeterSdkTest.java | 1 - .../metrics/{view => }/ViewRegistryTest.java | 9 +++--- 24 files changed, 32 insertions(+), 47 deletions(-) rename sdk/src/main/java/io/opentelemetry/sdk/metrics/{view => }/ViewRegistry.java (80%) rename sdk/src/test/java/io/opentelemetry/sdk/metrics/{view => }/ViewRegistryTest.java (95%) diff --git a/sdk/src/jmh/java/io/opentelemetry/sdk/metrics/TestSdk.java b/sdk/src/jmh/java/io/opentelemetry/sdk/metrics/TestSdk.java index 2d5268da3ba..09711e5e8ba 100644 --- a/sdk/src/jmh/java/io/opentelemetry/sdk/metrics/TestSdk.java +++ b/sdk/src/jmh/java/io/opentelemetry/sdk/metrics/TestSdk.java @@ -21,7 +21,6 @@ import io.opentelemetry.metrics.Meter; import io.opentelemetry.sdk.common.InstrumentationLibraryInfo; import io.opentelemetry.sdk.internal.MillisClock; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; public enum TestSdk { diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batcher.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batcher.java index a19b58691d2..50393335d90 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batcher.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batcher.java @@ -30,7 +30,7 @@ * cycle must be protected by a lock. A collection cycle is defined by multiple calls to {@link * #batch(Labels, Aggregator, boolean)} followed by one {@link #completeCollectionCycle()}; */ -public interface Batcher { +interface Batcher { /** * Returns the {@link Aggregator} that should be used by the bindings, or observers. diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batchers.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batchers.java index c8863f61c8b..3ac57665a99 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batchers.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/Batchers.java @@ -34,9 +34,9 @@ import java.util.Map; /** A collection of available Batchers. */ -public final class Batchers { +final class Batchers { - public static Batcher getNoop() { + static Batcher getNoop() { return Noop.INSTANCE; } @@ -45,7 +45,7 @@ public static Batcher getNoop() { * "Cumulative" means that all metrics that are generated will be considered for the lifetime of * the Instrument being aggregated. */ - public static Batcher getCumulativeAllLabels( + static Batcher getCumulativeAllLabels( InstrumentDescriptor descriptor, MeterProviderSharedState meterProviderSharedState, MeterSharedState meterSharedState, @@ -63,7 +63,7 @@ public static Batcher getCumulativeAllLabels( * Create a Batcher that uses the "delta" Temporality and uses all labels for aggregation. "Delta" * means that all metrics that are generated are only for the most recent collection interval. */ - public static Batcher getDeltaAllLabels( + static Batcher getDeltaAllLabels( InstrumentDescriptor descriptor, MeterProviderSharedState meterProviderSharedState, MeterSharedState meterSharedState, diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/InstrumentDescriptor.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/InstrumentDescriptor.java index aa16c89a41d..d6e78b94147 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/InstrumentDescriptor.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/InstrumentDescriptor.java @@ -25,8 +25,8 @@ @AutoValue @Immutable -public abstract class InstrumentDescriptor { - public static InstrumentDescriptor create( +abstract class InstrumentDescriptor { + static InstrumentDescriptor create( String name, String description, String unit, @@ -45,7 +45,7 @@ public static InstrumentDescriptor create( abstract Labels getConstantLabels(); - public abstract InstrumentType getType(); + abstract InstrumentType getType(); abstract InstrumentValueType getValueType(); diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterProviderSharedState.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterProviderSharedState.java index aeb5395809e..7aebe9b9518 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterProviderSharedState.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterProviderSharedState.java @@ -23,12 +23,12 @@ @AutoValue @Immutable -public abstract class MeterProviderSharedState { +abstract class MeterProviderSharedState { static MeterProviderSharedState create(Clock clock, Resource resource) { return new AutoValue_MeterProviderSharedState(clock, resource); } - public abstract Clock getClock(); + abstract Clock getClock(); abstract Resource getResource(); } 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 0b740a92f3f..5a042d40747 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdk.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdk.java @@ -19,7 +19,6 @@ import io.opentelemetry.metrics.Meter; import io.opentelemetry.sdk.common.InstrumentationLibraryInfo; import io.opentelemetry.sdk.metrics.data.MetricData; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import java.util.ArrayList; import java.util.Collection; import java.util.List; diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdkProvider.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdkProvider.java index bd3fa8b04e2..992ac48c185 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdkProvider.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSdkProvider.java @@ -24,7 +24,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.export.MetricProducer; import io.opentelemetry.sdk.metrics.view.InstrumentSelector; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.metrics.view.ViewSpecification; import io.opentelemetry.sdk.resources.EnvVarResource; import io.opentelemetry.sdk.resources.Resource; diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSharedState.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSharedState.java index a18344429b0..169814133d6 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSharedState.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/MeterSharedState.java @@ -22,7 +22,7 @@ @AutoValue @Immutable -public abstract class MeterSharedState { +abstract class MeterSharedState { static MeterSharedState create(InstrumentationLibraryInfo instrumentationLibraryInfo) { return new AutoValue_MeterSharedState(instrumentationLibraryInfo, new InstrumentRegistry()); } diff --git a/sdk/src/main/java/io/opentelemetry/sdk/metrics/view/ViewRegistry.java b/sdk/src/main/java/io/opentelemetry/sdk/metrics/ViewRegistry.java similarity index 80% rename from sdk/src/main/java/io/opentelemetry/sdk/metrics/view/ViewRegistry.java rename to sdk/src/main/java/io/opentelemetry/sdk/metrics/ViewRegistry.java index 4f77e1445cc..5727c28182f 100644 --- a/sdk/src/main/java/io/opentelemetry/sdk/metrics/view/ViewRegistry.java +++ b/sdk/src/main/java/io/opentelemetry/sdk/metrics/ViewRegistry.java @@ -14,13 +14,12 @@ * limitations under the License. */ -package io.opentelemetry.sdk.metrics.view; +package io.opentelemetry.sdk.metrics; -import io.opentelemetry.sdk.metrics.Batcher; -import io.opentelemetry.sdk.metrics.Batchers; -import io.opentelemetry.sdk.metrics.InstrumentDescriptor; -import io.opentelemetry.sdk.metrics.MeterProviderSharedState; -import io.opentelemetry.sdk.metrics.MeterSharedState; +import io.opentelemetry.sdk.metrics.view.Aggregation; +import io.opentelemetry.sdk.metrics.view.Aggregations; +import io.opentelemetry.sdk.metrics.view.InstrumentSelector; +import io.opentelemetry.sdk.metrics.view.ViewSpecification; import io.opentelemetry.sdk.metrics.view.ViewSpecification.Temporality; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -42,20 +41,23 @@ * Central location for Views to be registered. Registration of a view should eventually be done via * the {@link io.opentelemetry.sdk.metrics.MeterSdkProvider}. */ -public class ViewRegistry { +class ViewRegistry { - public static final ViewSpecification CUMULATIVE_SUM = + private static final ViewSpecification CUMULATIVE_SUM = ViewSpecification.create(Aggregations.sum(), Temporality.CUMULATIVE); - public static final ViewSpecification DELTA_SUMMARY = + private static final ViewSpecification DELTA_SUMMARY = ViewSpecification.create(Aggregations.minMaxSumCount(), Temporality.DELTA); - public static final ViewSpecification CUMULATIVE_LAST_VALUE = + private static final ViewSpecification CUMULATIVE_LAST_VALUE = ViewSpecification.create(Aggregations.lastValue(), Temporality.CUMULATIVE); private final Map configuration = new ConcurrentHashMap<>(); - /** Create a new {@link Batcher} for use in metric recording aggregation. */ - public Batcher createBatcher( + /** + * Create a new {@link io.opentelemetry.sdk.metrics.Batcher} for use in metric recording + * aggregation. + */ + Batcher createBatcher( MeterProviderSharedState meterProviderSharedState, MeterSharedState meterSharedState, InstrumentDescriptor descriptor) { @@ -92,6 +94,8 @@ private static ViewSpecification getDefaultSpecification(InstrumentDescriptor de case COUNTER: case UP_DOWN_COUNTER: return CUMULATIVE_SUM; + // TODO: Revisit the batcher used here for value observers, + // currently this does not remove duplicate records in the same cycle. case VALUE_OBSERVER: case VALUE_RECORDER: return DELTA_SUMMARY; @@ -102,8 +106,7 @@ private static ViewSpecification getDefaultSpecification(InstrumentDescriptor de throw new IllegalArgumentException("Unknown descriptor type: " + descriptor.getType()); } - /** todo: javadoc me. */ - public void registerView(InstrumentSelector selector, ViewSpecification specification) { + void registerView(InstrumentSelector selector, ViewSpecification specification) { configuration.put(selector, specification); } } diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/BatchRecorderSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/BatchRecorderSdkTest.java index a989db7c906..ee926b7087d 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/BatchRecorderSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/BatchRecorderSdkTest.java @@ -27,7 +27,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.DoublePoint; import io.opentelemetry.sdk.metrics.data.MetricData.LongPoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Collections; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleCounterSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleCounterSdkTest.java index ec38ecaec36..55ec8cda6d6 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleCounterSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleCounterSdkTest.java @@ -29,7 +29,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.DoublePoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.List; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleSumObserverSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleSumObserverSdkTest.java index 9aad5a91fb9..868f159d772 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleSumObserverSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleSumObserverSdkTest.java @@ -26,7 +26,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.DoublePoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Collections; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownCounterSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownCounterSdkTest.java index 9cdaf360b63..0e808ebee8e 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownCounterSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownCounterSdkTest.java @@ -29,7 +29,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.DoublePoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.List; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownSumObserverSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownSumObserverSdkTest.java index b120b8c8120..84348266ec8 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownSumObserverSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleUpDownSumObserverSdkTest.java @@ -26,7 +26,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.DoublePoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Collections; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueObserverSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueObserverSdkTest.java index fdfa16990b5..00d36906055 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueObserverSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueObserverSdkTest.java @@ -27,7 +27,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.SummaryPoint; import io.opentelemetry.sdk.metrics.data.MetricData.ValueAtPercentile; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Arrays; import java.util.Collections; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueRecorderSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueRecorderSdkTest.java index 472c9bf3b52..8931d3d2be6 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueRecorderSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/DoubleValueRecorderSdkTest.java @@ -30,7 +30,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.SummaryPoint; import io.opentelemetry.sdk.metrics.data.MetricData.ValueAtPercentile; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Arrays; import java.util.Collections; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongCounterSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongCounterSdkTest.java index e7912efebc4..3dc00ff03ab 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongCounterSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongCounterSdkTest.java @@ -29,7 +29,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.LongPoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.List; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongSumObserverSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongSumObserverSdkTest.java index 1a1b879af57..b36c0826c45 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongSumObserverSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongSumObserverSdkTest.java @@ -26,7 +26,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.LongPoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Collections; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownCounterSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownCounterSdkTest.java index cfdd9b46996..eb1bbffadf5 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownCounterSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownCounterSdkTest.java @@ -29,7 +29,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.LongPoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.List; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownSumObserverSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownSumObserverSdkTest.java index ce73d052063..f2d93a3cb9c 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownSumObserverSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongUpDownSumObserverSdkTest.java @@ -26,7 +26,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData; import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.LongPoint; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Collections; import org.junit.Rule; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueObserverSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueObserverSdkTest.java index 1b3ce8e0f2f..1ff2c4de934 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueObserverSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueObserverSdkTest.java @@ -27,7 +27,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.SummaryPoint; import io.opentelemetry.sdk.metrics.data.MetricData.ValueAtPercentile; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Arrays; import java.util.Collections; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueRecorderSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueRecorderSdkTest.java index 0323bf347ff..86b52da32d9 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueRecorderSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/LongValueRecorderSdkTest.java @@ -30,7 +30,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData.Descriptor; import io.opentelemetry.sdk.metrics.data.MetricData.SummaryPoint; import io.opentelemetry.sdk.metrics.data.MetricData.ValueAtPercentile; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Arrays; import java.util.Collections; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/MeterSdkTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/MeterSdkTest.java index 5ed675e95f0..a427bbbd25c 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/MeterSdkTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/MeterSdkTest.java @@ -30,7 +30,6 @@ import io.opentelemetry.sdk.metrics.data.MetricData.LongPoint; import io.opentelemetry.sdk.metrics.data.MetricData.SummaryPoint; import io.opentelemetry.sdk.metrics.data.MetricData.ValueAtPercentile; -import io.opentelemetry.sdk.metrics.view.ViewRegistry; import io.opentelemetry.sdk.resources.Resource; import java.util.Arrays; import java.util.Collections; diff --git a/sdk/src/test/java/io/opentelemetry/sdk/metrics/view/ViewRegistryTest.java b/sdk/src/test/java/io/opentelemetry/sdk/metrics/ViewRegistryTest.java similarity index 95% rename from sdk/src/test/java/io/opentelemetry/sdk/metrics/view/ViewRegistryTest.java rename to sdk/src/test/java/io/opentelemetry/sdk/metrics/ViewRegistryTest.java index 0e5c8d488c3..a5901c0b12a 100644 --- a/sdk/src/test/java/io/opentelemetry/sdk/metrics/view/ViewRegistryTest.java +++ b/sdk/src/test/java/io/opentelemetry/sdk/metrics/ViewRegistryTest.java @@ -14,17 +14,13 @@ * limitations under the License. */ -package io.opentelemetry.sdk.metrics.view; +package io.opentelemetry.sdk.metrics; import static com.google.common.truth.Truth.assertThat; import static org.mockito.Mockito.when; import io.opentelemetry.common.Labels; import io.opentelemetry.sdk.internal.TestClock; -import io.opentelemetry.sdk.metrics.Batcher; -import io.opentelemetry.sdk.metrics.InstrumentDescriptor; -import io.opentelemetry.sdk.metrics.MeterProviderSharedState; -import io.opentelemetry.sdk.metrics.MeterSharedState; import io.opentelemetry.sdk.metrics.aggregator.DoubleLastValueAggregator; import io.opentelemetry.sdk.metrics.aggregator.DoubleMinMaxSumCount; import io.opentelemetry.sdk.metrics.aggregator.DoubleSumAggregator; @@ -33,6 +29,9 @@ import io.opentelemetry.sdk.metrics.aggregator.LongSumAggregator; import io.opentelemetry.sdk.metrics.common.InstrumentType; import io.opentelemetry.sdk.metrics.common.InstrumentValueType; +import io.opentelemetry.sdk.metrics.view.Aggregations; +import io.opentelemetry.sdk.metrics.view.InstrumentSelector; +import io.opentelemetry.sdk.metrics.view.ViewSpecification; import io.opentelemetry.sdk.metrics.view.ViewSpecification.Temporality; import org.junit.Before; import org.junit.Test;