File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
main/java/io/opentelemetry/contrib/noopapi
test/java/io/opentelemetry/contrib/noopapi Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1515/**
1616 * A {@link ContextStorageProvider} that returns a {@link ContextStorage} which is completely no-op.
1717 */
18- public class NoopContextStorageProvider implements ContextStorageProvider {
18+ public final class NoopContextStorageProvider implements ContextStorageProvider {
1919
2020 /** Returns a no-op context storage. */
2121 @ Override
Original file line number Diff line number Diff line change 4242 * <p>The above will succeed both with the {@linkplain OpenTelemetry#noop() default implementation}
4343 * and this one, but with this implementation there will be no overhead at all.
4444 */
45- public class NoopOpenTelemetry implements OpenTelemetry {
45+ public final class NoopOpenTelemetry implements OpenTelemetry {
4646
4747 private static final OpenTelemetry INSTANCE = new NoopOpenTelemetry ();
4848
Original file line number Diff line number Diff line change 55
66package io .opentelemetry .contrib .noopapi ;
77
8+ import static java .util .concurrent .TimeUnit .DAYS ;
89import static org .assertj .core .api .Assertions .assertThat ;
910
1011import io .opentelemetry .api .common .AttributeKey ;
1718import io .opentelemetry .api .trace .TraceState ;
1819import io .opentelemetry .context .Context ;
1920import io .opentelemetry .context .Scope ;
20- import java .util .concurrent .TimeUnit ;
2121import org .junit .jupiter .api .Test ;
2222
2323class NoopOpenTelemetryTest {
@@ -61,7 +61,7 @@ void tracerNoOp() {
6161 span1 .setAttribute ("key" , true );
6262 span1 .setAttribute (AttributeKey .stringKey ("key" ), "value" );
6363 span1 .setSpanKind (SpanKind .CLIENT );
64- span1 .setStartTimestamp (1 , TimeUnit . DAYS );
64+ span1 .setStartTimestamp (1 , DAYS );
6565
6666 // No allocations
6767 assertThat (span1 .startSpan ()).isSameAs (Span .getInvalid ());
You can’t perform that action at this time.
0 commit comments