diff --git a/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/ExtendedSdkLogRecordBuilder.java b/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/ExtendedSdkLogRecordBuilder.java index ecaab256377..ba1d0e6cfd2 100644 --- a/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/ExtendedSdkLogRecordBuilder.java +++ b/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/ExtendedSdkLogRecordBuilder.java @@ -8,7 +8,6 @@ import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Value; import io.opentelemetry.api.incubator.logs.ExtendedLogRecordBuilder; -import io.opentelemetry.api.logs.LogRecordBuilder; import io.opentelemetry.api.logs.Severity; import io.opentelemetry.context.Context; import io.opentelemetry.sdk.common.InstrumentationScopeInfo; @@ -37,13 +36,13 @@ public ExtendedSdkLogRecordBuilder setTimestamp(Instant instant) { } @Override - public LogRecordBuilder setObservedTimestamp(long timestamp, TimeUnit unit) { + public ExtendedSdkLogRecordBuilder setObservedTimestamp(long timestamp, TimeUnit unit) { super.setObservedTimestamp(timestamp, unit); return this; } @Override - public LogRecordBuilder setObservedTimestamp(Instant instant) { + public ExtendedSdkLogRecordBuilder setObservedTimestamp(Instant instant) { super.setObservedTimestamp(instant); return this; } diff --git a/sdk/trace/src/testIncubating/java/io/opentelemetry/sdk/trace/TracerConfigTest.java b/sdk/trace/src/testIncubating/java/io/opentelemetry/sdk/trace/TracerConfigTest.java index 2610e324aa8..e7aefbb5152 100644 --- a/sdk/trace/src/testIncubating/java/io/opentelemetry/sdk/trace/TracerConfigTest.java +++ b/sdk/trace/src/testIncubating/java/io/opentelemetry/sdk/trace/TracerConfigTest.java @@ -11,6 +11,7 @@ import static io.opentelemetry.sdk.trace.internal.TracerConfig.defaultConfig; import static io.opentelemetry.sdk.trace.internal.TracerConfig.disabled; import static io.opentelemetry.sdk.trace.internal.TracerConfig.enabled; +import static org.assertj.core.api.Assertions.assertThat; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.incubator.trace.ExtendedTracer; @@ -24,7 +25,6 @@ import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor; import io.opentelemetry.sdk.trace.internal.TracerConfig; import java.util.stream.Stream; -import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -56,8 +56,8 @@ void disableScopes() throws InterruptedException { parent.setAttribute("a", "1"); child = tracerB.spanBuilder("child").startSpan(); // tracerB is disabled and should behave the same as noop tracer - Assertions.assertThat(child.getSpanContext()).isEqualTo(parent.getSpanContext()); - Assertions.assertThat(child.isRecording()).isFalse(); + assertThat(child.getSpanContext()).isEqualTo(parent.getSpanContext()); + assertThat(child.isRecording()).isFalse(); try (Scope childScope = child.makeCurrent()) { child.setAttribute("b", "1"); grandchild = tracerC.spanBuilder("grandchild").startSpan(); @@ -76,7 +76,7 @@ void disableScopes() throws InterruptedException { // Only contain tracerA:parent and tracerC:child should be seen // tracerC:grandchild should list tracerA:parent as its parent - Assertions.assertThat(exporter.getFinishedSpanItems()) + assertThat(exporter.getFinishedSpanItems()) .satisfiesExactlyInAnyOrder( spanData -> assertThat(spanData) @@ -106,7 +106,7 @@ void tracerConfigurator( TracerConfig expectedTracerConfig) { TracerConfig tracerConfig = tracerConfigurator.apply(scope); tracerConfig = tracerConfig == null ? defaultConfig() : tracerConfig; - Assertions.assertThat(tracerConfig).isEqualTo(expectedTracerConfig); + assertThat(tracerConfig).isEqualTo(expectedTracerConfig); } private static final InstrumentationScopeInfo scopeCat = InstrumentationScopeInfo.create("cat");