Renaame instruments *Sdk. -> Sdk* (#3508)
This commit is contained in:
parent
17f2ba3c1f
commit
e3bbca0b06
|
|
@ -21,10 +21,10 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.WriteableMetricStorage;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
final class DoubleCounterSdk extends AbstractInstrument implements DoubleCounter {
|
||||
final class SdkDoubleCounter extends AbstractInstrument implements DoubleCounter {
|
||||
private final WriteableMetricStorage storage;
|
||||
|
||||
private DoubleCounterSdk(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
private SdkDoubleCounter(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
super(descriptor);
|
||||
this.storage = storage;
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@ final class DoubleCounterSdk extends AbstractInstrument implements DoubleCounter
|
|||
}
|
||||
}
|
||||
|
||||
static final class Builder extends AbstractInstrumentBuilder<DoubleCounterSdk.Builder>
|
||||
static final class Builder extends AbstractInstrumentBuilder<SdkDoubleCounter.Builder>
|
||||
implements DoubleCounterBuilder {
|
||||
|
||||
Builder(
|
||||
|
|
@ -111,14 +111,14 @@ final class DoubleCounterSdk extends AbstractInstrument implements DoubleCounter
|
|||
}
|
||||
|
||||
@Override
|
||||
public DoubleCounterSdk build() {
|
||||
public SdkDoubleCounter build() {
|
||||
return buildSynchronousInstrument(
|
||||
InstrumentType.COUNTER, InstrumentValueType.DOUBLE, DoubleCounterSdk::new);
|
||||
InstrumentType.COUNTER, InstrumentValueType.DOUBLE, SdkDoubleCounter::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LongCounterBuilder ofLongs() {
|
||||
return swapBuilder(LongCounterSdk.Builder::new);
|
||||
return swapBuilder(SdkLongCounter.Builder::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -13,17 +13,17 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterProviderSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
final class DoubleGaugeBuilderSdk extends AbstractInstrumentBuilder<DoubleGaugeBuilderSdk>
|
||||
final class SdkDoubleGaugeBuilder extends AbstractInstrumentBuilder<SdkDoubleGaugeBuilder>
|
||||
implements DoubleGaugeBuilder {
|
||||
|
||||
DoubleGaugeBuilderSdk(
|
||||
SdkDoubleGaugeBuilder(
|
||||
MeterProviderSharedState meterProviderSharedState,
|
||||
MeterSharedState meterSharedState,
|
||||
String name) {
|
||||
this(meterProviderSharedState, meterSharedState, name, "", "1");
|
||||
}
|
||||
|
||||
DoubleGaugeBuilderSdk(
|
||||
SdkDoubleGaugeBuilder(
|
||||
MeterProviderSharedState meterProviderSharedState,
|
||||
MeterSharedState sharedState,
|
||||
String name,
|
||||
|
|
@ -33,13 +33,13 @@ final class DoubleGaugeBuilderSdk extends AbstractInstrumentBuilder<DoubleGaugeB
|
|||
}
|
||||
|
||||
@Override
|
||||
protected DoubleGaugeBuilderSdk getThis() {
|
||||
protected SdkDoubleGaugeBuilder getThis() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LongGaugeBuilder ofLongs() {
|
||||
return swapBuilder(LongGaugeBuilderSdk::new);
|
||||
return swapBuilder(SdkLongGaugeBuilder::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -19,10 +19,10 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterProviderSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
||||
import io.opentelemetry.sdk.metrics.internal.state.WriteableMetricStorage;
|
||||
|
||||
final class DoubleHistogramSdk extends AbstractInstrument implements DoubleHistogram {
|
||||
final class SdkDoubleHistogram extends AbstractInstrument implements DoubleHistogram {
|
||||
private final WriteableMetricStorage storage;
|
||||
|
||||
private DoubleHistogramSdk(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
private SdkDoubleHistogram(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
super(descriptor);
|
||||
this.storage = storage;
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ final class DoubleHistogramSdk extends AbstractInstrument implements DoubleHisto
|
|||
}
|
||||
}
|
||||
|
||||
static final class Builder extends AbstractInstrumentBuilder<DoubleHistogramSdk.Builder>
|
||||
static final class Builder extends AbstractInstrumentBuilder<SdkDoubleHistogram.Builder>
|
||||
implements DoubleHistogramBuilder {
|
||||
|
||||
Builder(
|
||||
|
|
@ -97,14 +97,14 @@ final class DoubleHistogramSdk extends AbstractInstrument implements DoubleHisto
|
|||
}
|
||||
|
||||
@Override
|
||||
public DoubleHistogramSdk build() {
|
||||
public SdkDoubleHistogram build() {
|
||||
return buildSynchronousInstrument(
|
||||
InstrumentType.HISTOGRAM, InstrumentValueType.DOUBLE, DoubleHistogramSdk::new);
|
||||
InstrumentType.HISTOGRAM, InstrumentValueType.DOUBLE, SdkDoubleHistogram::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LongHistogramBuilder ofLongs() {
|
||||
return swapBuilder(LongHistogramSdk.Builder::new);
|
||||
return swapBuilder(SdkLongHistogram.Builder::new);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,10 +21,10 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.WriteableMetricStorage;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
final class DoubleUpDownCounterSdk extends AbstractInstrument implements DoubleUpDownCounter {
|
||||
final class SdkDoubleUpDownCounter extends AbstractInstrument implements DoubleUpDownCounter {
|
||||
private final WriteableMetricStorage storage;
|
||||
|
||||
private DoubleUpDownCounterSdk(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
private SdkDoubleUpDownCounter(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
super(descriptor);
|
||||
this.storage = storage;
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ final class DoubleUpDownCounterSdk extends AbstractInstrument implements DoubleU
|
|||
}
|
||||
}
|
||||
|
||||
static final class Builder extends AbstractInstrumentBuilder<DoubleUpDownCounterSdk.Builder>
|
||||
static final class Builder extends AbstractInstrumentBuilder<SdkDoubleUpDownCounter.Builder>
|
||||
implements DoubleUpDownCounterBuilder {
|
||||
|
||||
Builder(
|
||||
|
|
@ -101,12 +101,12 @@ final class DoubleUpDownCounterSdk extends AbstractInstrument implements DoubleU
|
|||
@Override
|
||||
public DoubleUpDownCounter build() {
|
||||
return buildSynchronousInstrument(
|
||||
InstrumentType.UP_DOWN_COUNTER, InstrumentValueType.DOUBLE, DoubleUpDownCounterSdk::new);
|
||||
InstrumentType.UP_DOWN_COUNTER, InstrumentValueType.DOUBLE, SdkDoubleUpDownCounter::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LongUpDownCounterBuilder ofLongs() {
|
||||
return swapBuilder(LongUpDownCounterSdk.Builder::new);
|
||||
return swapBuilder(SdkLongUpDownCounter.Builder::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -21,10 +21,10 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.WriteableMetricStorage;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
final class LongCounterSdk extends AbstractInstrument implements LongCounter {
|
||||
final class SdkLongCounter extends AbstractInstrument implements LongCounter {
|
||||
private final WriteableMetricStorage storage;
|
||||
|
||||
private LongCounterSdk(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
private SdkLongCounter(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
super(descriptor);
|
||||
this.storage = storage;
|
||||
}
|
||||
|
|
@ -105,14 +105,14 @@ final class LongCounterSdk extends AbstractInstrument implements LongCounter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public LongCounterSdk build() {
|
||||
public SdkLongCounter build() {
|
||||
return buildSynchronousInstrument(
|
||||
InstrumentType.COUNTER, InstrumentValueType.LONG, LongCounterSdk::new);
|
||||
InstrumentType.COUNTER, InstrumentValueType.LONG, SdkLongCounter::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleCounterBuilder ofDoubles() {
|
||||
return swapBuilder(DoubleCounterSdk.Builder::new);
|
||||
return swapBuilder(SdkDoubleCounter.Builder::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -13,17 +13,17 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterProviderSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
final class LongGaugeBuilderSdk extends AbstractInstrumentBuilder<LongGaugeBuilderSdk>
|
||||
final class SdkLongGaugeBuilder extends AbstractInstrumentBuilder<SdkLongGaugeBuilder>
|
||||
implements LongGaugeBuilder {
|
||||
|
||||
LongGaugeBuilderSdk(
|
||||
SdkLongGaugeBuilder(
|
||||
MeterProviderSharedState meterProviderSharedState,
|
||||
MeterSharedState meterSharedState,
|
||||
String name) {
|
||||
this(meterProviderSharedState, meterSharedState, name, "", "1");
|
||||
}
|
||||
|
||||
LongGaugeBuilderSdk(
|
||||
SdkLongGaugeBuilder(
|
||||
MeterProviderSharedState meterProviderSharedState,
|
||||
MeterSharedState sharedState,
|
||||
String name,
|
||||
|
|
@ -33,13 +33,13 @@ final class LongGaugeBuilderSdk extends AbstractInstrumentBuilder<LongGaugeBuild
|
|||
}
|
||||
|
||||
@Override
|
||||
protected LongGaugeBuilderSdk getThis() {
|
||||
protected SdkLongGaugeBuilder getThis() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleGaugeBuilder ofDoubles() {
|
||||
return swapBuilder(DoubleGaugeBuilderSdk::new);
|
||||
return swapBuilder(SdkDoubleGaugeBuilder::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -19,10 +19,10 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterProviderSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
||||
import io.opentelemetry.sdk.metrics.internal.state.WriteableMetricStorage;
|
||||
|
||||
final class LongHistogramSdk extends AbstractInstrument implements LongHistogram {
|
||||
final class SdkLongHistogram extends AbstractInstrument implements LongHistogram {
|
||||
private final WriteableMetricStorage storage;
|
||||
|
||||
private LongHistogramSdk(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
private SdkLongHistogram(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
super(descriptor);
|
||||
this.storage = storage;
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ final class LongHistogramSdk extends AbstractInstrument implements LongHistogram
|
|||
}
|
||||
}
|
||||
|
||||
static final class Builder extends AbstractInstrumentBuilder<LongHistogramSdk.Builder>
|
||||
static final class Builder extends AbstractInstrumentBuilder<SdkLongHistogram.Builder>
|
||||
implements LongHistogramBuilder {
|
||||
|
||||
Builder(
|
||||
|
|
@ -97,14 +97,14 @@ final class LongHistogramSdk extends AbstractInstrument implements LongHistogram
|
|||
}
|
||||
|
||||
@Override
|
||||
public LongHistogramSdk build() {
|
||||
public SdkLongHistogram build() {
|
||||
return buildSynchronousInstrument(
|
||||
InstrumentType.HISTOGRAM, InstrumentValueType.LONG, LongHistogramSdk::new);
|
||||
InstrumentType.HISTOGRAM, InstrumentValueType.LONG, SdkLongHistogram::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleHistogramBuilder ofDoubles() {
|
||||
return swapBuilder(DoubleHistogramSdk.Builder::new);
|
||||
return swapBuilder(SdkDoubleHistogram.Builder::new);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,10 +21,10 @@ import io.opentelemetry.sdk.metrics.internal.state.MeterSharedState;
|
|||
import io.opentelemetry.sdk.metrics.internal.state.WriteableMetricStorage;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
final class LongUpDownCounterSdk extends AbstractInstrument implements LongUpDownCounter {
|
||||
final class SdkLongUpDownCounter extends AbstractInstrument implements LongUpDownCounter {
|
||||
private final WriteableMetricStorage storage;
|
||||
|
||||
private LongUpDownCounterSdk(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
private SdkLongUpDownCounter(InstrumentDescriptor descriptor, WriteableMetricStorage storage) {
|
||||
super(descriptor);
|
||||
this.storage = storage;
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ final class LongUpDownCounterSdk extends AbstractInstrument implements LongUpDow
|
|||
}
|
||||
}
|
||||
|
||||
static final class Builder extends AbstractInstrumentBuilder<LongUpDownCounterSdk.Builder>
|
||||
static final class Builder extends AbstractInstrumentBuilder<SdkLongUpDownCounter.Builder>
|
||||
implements LongUpDownCounterBuilder {
|
||||
|
||||
Builder(
|
||||
|
|
@ -101,12 +101,12 @@ final class LongUpDownCounterSdk extends AbstractInstrument implements LongUpDow
|
|||
@Override
|
||||
public LongUpDownCounter build() {
|
||||
return buildSynchronousInstrument(
|
||||
InstrumentType.UP_DOWN_COUNTER, InstrumentValueType.LONG, LongUpDownCounterSdk::new);
|
||||
InstrumentType.UP_DOWN_COUNTER, InstrumentValueType.LONG, SdkLongUpDownCounter::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleUpDownCounterBuilder ofDoubles() {
|
||||
return swapBuilder(DoubleUpDownCounterSdk.Builder::new);
|
||||
return swapBuilder(SdkDoubleUpDownCounter.Builder::new);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -40,21 +40,21 @@ final class SdkMeter implements Meter {
|
|||
|
||||
@Override
|
||||
public LongCounterBuilder counterBuilder(String name) {
|
||||
return new LongCounterSdk.Builder(meterProviderSharedState, meterSharedState, name);
|
||||
return new SdkLongCounter.Builder(meterProviderSharedState, meterSharedState, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LongUpDownCounterBuilder upDownCounterBuilder(String name) {
|
||||
return new LongUpDownCounterSdk.Builder(meterProviderSharedState, meterSharedState, name);
|
||||
return new SdkLongUpDownCounter.Builder(meterProviderSharedState, meterSharedState, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleHistogramBuilder histogramBuilder(String name) {
|
||||
return new DoubleHistogramSdk.Builder(meterProviderSharedState, meterSharedState, name);
|
||||
return new SdkDoubleHistogram.Builder(meterProviderSharedState, meterSharedState, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoubleGaugeBuilder gaugeBuilder(String name) {
|
||||
return new DoubleGaugeBuilderSdk(meterProviderSharedState, meterSharedState, name);
|
||||
return new SdkDoubleGaugeBuilder(meterProviderSharedState, meterSharedState, name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@ import io.opentelemetry.sdk.testing.time.TestClock;
|
|||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link DoubleCounterSdk}. */
|
||||
class DoubleCounterSdkTest {
|
||||
/** Unit tests for {@link SdkDoubleCounter}. */
|
||||
class SdkDoubleCounterTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(DoubleCounterSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkDoubleCounterTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -187,7 +187,7 @@ class DoubleCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((DoubleCounterSdk) doubleCounter)
|
||||
.setInstrument((SdkDoubleCounter) doubleCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -233,7 +233,7 @@ class DoubleCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((DoubleCounterSdk) doubleCounter)
|
||||
.setInstrument((SdkDoubleCounter) doubleCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -17,11 +17,11 @@ import java.time.Duration;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link DoubleValueObserverSdk}. */
|
||||
class DoubleGaugeBuilderSdkTest {
|
||||
class SdkDoubleGaugeBuilderTest {
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(DoubleGaugeBuilderSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkDoubleGaugeBuilderTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -21,13 +21,13 @@ import io.opentelemetry.sdk.testing.time.TestClock;
|
|||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link DoubleHistogramSdk}. */
|
||||
class DoubleHistogramSdkTest {
|
||||
/** Unit tests for {@link SdkDoubleHistogram}. */
|
||||
class SdkDoubleHistogramTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(DoubleHistogramSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkDoubleHistogramTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -181,7 +181,7 @@ class DoubleHistogramSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((DoubleHistogramSdk) doubleRecorder)
|
||||
.setInstrument((SdkDoubleHistogram) doubleRecorder)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -189,7 +189,7 @@ class DoubleHistogramSdkTest {
|
|||
StressTestRunner.Operation.create(
|
||||
1_000,
|
||||
2,
|
||||
new DoubleHistogramSdkTest.OperationUpdaterDirectCall(doubleRecorder, "K", "V")));
|
||||
new SdkDoubleHistogramTest.OperationUpdaterDirectCall(doubleRecorder, "K", "V")));
|
||||
stressTestBuilder.addOperation(
|
||||
StressTestRunner.Operation.create(
|
||||
1_000,
|
||||
|
|
@ -226,7 +226,7 @@ class DoubleHistogramSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((DoubleHistogramSdk) doubleRecorder)
|
||||
.setInstrument((SdkDoubleHistogram) doubleRecorder)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -234,7 +234,7 @@ class DoubleHistogramSdkTest {
|
|||
StressTestRunner.Operation.create(
|
||||
2_000,
|
||||
1,
|
||||
new DoubleHistogramSdkTest.OperationUpdaterDirectCall(
|
||||
new SdkDoubleHistogramTest.OperationUpdaterDirectCall(
|
||||
doubleRecorder, keys[i], values[i])));
|
||||
|
||||
stressTestBuilder.addOperation(
|
||||
|
|
@ -22,12 +22,12 @@ import java.time.Duration;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link DoubleSumObserverSdk}. */
|
||||
class DoubleSumObserverSdkTest {
|
||||
class SdkDoubleSumObserverTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(DoubleSumObserverSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkDoubleSumObserverTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProviderBuilder sdkMeterProviderBuilder =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE);
|
||||
|
|
@ -20,13 +20,13 @@ import io.opentelemetry.sdk.testing.time.TestClock;
|
|||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link DoubleUpDownCounterSdk}. */
|
||||
class DoubleUpDownCounterSdkTest {
|
||||
/** Unit tests for {@link SdkDoubleUpDownCounter}. */
|
||||
class SdkDoubleUpDownCounterTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(DoubleUpDownCounterSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkDoubleUpDownCounterTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -182,7 +182,7 @@ class DoubleUpDownCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((DoubleUpDownCounterSdk) doubleUpDownCounter)
|
||||
.setInstrument((SdkDoubleUpDownCounter) doubleUpDownCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -230,7 +230,7 @@ class DoubleUpDownCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((DoubleUpDownCounterSdk) doubleUpDownCounter)
|
||||
.setInstrument((SdkDoubleUpDownCounter) doubleUpDownCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -22,12 +22,12 @@ import java.time.Duration;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link DoubleUpDownSumObserverSdk}. */
|
||||
class DoubleUpDownSumObserverSdkTest {
|
||||
class SdkDoubleUpDownSumObserverTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(DoubleUpDownSumObserverSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkDoubleUpDownSumObserverTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProviderBuilder sdkMeterProviderBuilder =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE);
|
||||
|
|
@ -20,13 +20,13 @@ import io.opentelemetry.sdk.testing.time.TestClock;
|
|||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link LongCounterSdk}. */
|
||||
class LongCounterSdkTest {
|
||||
/** Unit tests for {@link SdkLongCounter}. */
|
||||
class SdkLongCounterTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(LongCounterSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkLongCounterTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -179,7 +179,7 @@ class LongCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((LongCounterSdk) longCounter)
|
||||
.setInstrument((SdkLongCounter) longCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -226,7 +226,7 @@ class LongCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((LongCounterSdk) longCounter)
|
||||
.setInstrument((SdkLongCounter) longCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -17,11 +17,11 @@ import java.time.Duration;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link LongValueObserverSdk}. */
|
||||
class LongGaugeBuilderSdkTest {
|
||||
class SdkLongGaugeBuilderTest {
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(LongGaugeBuilderSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkLongGaugeBuilderTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -21,13 +21,13 @@ import io.opentelemetry.sdk.testing.time.TestClock;
|
|||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link LongHistogramSdk}. */
|
||||
class LongHistogramSdkTest {
|
||||
/** Unit tests for {@link SdkLongHistogram}. */
|
||||
class SdkLongHistogramTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(LongHistogramSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkLongHistogramTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -182,7 +182,7 @@ class LongHistogramSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((LongHistogramSdk) longRecorder)
|
||||
.setInstrument((SdkLongHistogram) longRecorder)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -190,12 +190,12 @@ class LongHistogramSdkTest {
|
|||
StressTestRunner.Operation.create(
|
||||
2_000,
|
||||
1,
|
||||
new LongHistogramSdkTest.OperationUpdaterDirectCall(longRecorder, "K", "V")));
|
||||
new SdkLongHistogramTest.OperationUpdaterDirectCall(longRecorder, "K", "V")));
|
||||
stressTestBuilder.addOperation(
|
||||
StressTestRunner.Operation.create(
|
||||
2_000,
|
||||
1,
|
||||
new LongHistogramSdkTest.OperationUpdaterWithBinding(
|
||||
new SdkLongHistogramTest.OperationUpdaterWithBinding(
|
||||
longRecorder.bind(Attributes.builder().put("K", "V").build()))));
|
||||
}
|
||||
|
||||
|
|
@ -227,7 +227,7 @@ class LongHistogramSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((LongHistogramSdk) longRecorder)
|
||||
.setInstrument((SdkLongHistogram) longRecorder)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -235,14 +235,14 @@ class LongHistogramSdkTest {
|
|||
StressTestRunner.Operation.create(
|
||||
1_000,
|
||||
2,
|
||||
new LongHistogramSdkTest.OperationUpdaterDirectCall(
|
||||
new SdkLongHistogramTest.OperationUpdaterDirectCall(
|
||||
longRecorder, keys[i], values[i])));
|
||||
|
||||
stressTestBuilder.addOperation(
|
||||
StressTestRunner.Operation.create(
|
||||
1_000,
|
||||
2,
|
||||
new LongHistogramSdkTest.OperationUpdaterWithBinding(
|
||||
new SdkLongHistogramTest.OperationUpdaterWithBinding(
|
||||
longRecorder.bind(Attributes.builder().put(keys[i], values[i]).build()))));
|
||||
}
|
||||
|
||||
|
|
@ -22,12 +22,12 @@ import java.time.Duration;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link LongSumObserverSdk}. */
|
||||
class LongSumObserverSdkTest {
|
||||
class SdkLongSumObserverTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(LongSumObserverSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkLongSumObserverTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProviderBuilder sdkMeterProviderBuilder =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE);
|
||||
|
|
@ -20,13 +20,13 @@ import io.opentelemetry.sdk.testing.time.TestClock;
|
|||
import java.time.Duration;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link LongUpDownCounterSdk}. */
|
||||
class LongUpDownCounterSdkTest {
|
||||
/** Unit tests for {@link SdkLongUpDownCounter}. */
|
||||
class SdkLongUpDownCounterTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(LongUpDownCounterSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkLongUpDownCounterTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProvider sdkMeterProvider =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE).build();
|
||||
|
|
@ -172,7 +172,7 @@ class LongUpDownCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((LongUpDownCounterSdk) longUpDownCounter)
|
||||
.setInstrument((SdkLongUpDownCounter) longUpDownCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -220,7 +220,7 @@ class LongUpDownCounterSdkTest {
|
|||
|
||||
StressTestRunner.Builder stressTestBuilder =
|
||||
StressTestRunner.builder()
|
||||
.setInstrument((LongUpDownCounterSdk) longUpDownCounter)
|
||||
.setInstrument((SdkLongUpDownCounter) longUpDownCounter)
|
||||
.setCollectionIntervalMs(100);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
|
|
@ -22,12 +22,12 @@ import java.time.Duration;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Unit tests for {@link LongUpDownSumObserverSdk}. */
|
||||
class LongUpDownSumObserverSdkTest {
|
||||
class SdkLongUpDownSumObserverTest {
|
||||
private static final long SECOND_NANOS = 1_000_000_000;
|
||||
private static final Resource RESOURCE =
|
||||
Resource.create(Attributes.of(stringKey("resource_key"), "resource_value"));
|
||||
private static final InstrumentationLibraryInfo INSTRUMENTATION_LIBRARY_INFO =
|
||||
InstrumentationLibraryInfo.create(LongUpDownSumObserverSdkTest.class.getName(), null);
|
||||
InstrumentationLibraryInfo.create(SdkLongUpDownSumObserverTest.class.getName(), null);
|
||||
private final TestClock testClock = TestClock.create();
|
||||
private final SdkMeterProviderBuilder sdkMeterProviderBuilder =
|
||||
SdkMeterProvider.builder().setClock(testClock).setResource(RESOURCE);
|
||||
Loading…
Reference in New Issue