diff --git a/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedDefaultLogger.java b/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedDefaultLogger.java index 378af1c6b00..d9a95a6d2d4 100644 --- a/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedDefaultLogger.java +++ b/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedDefaultLogger.java @@ -40,6 +40,11 @@ public ExtendedLogRecordBuilder setEventName(String eventName) { return this; } + @Override + public ExtendedLogRecordBuilder setException(Throwable throwable) { + return this; + } + @Override public LogRecordBuilder setTimestamp(long timestamp, TimeUnit unit) { return this; diff --git a/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedLogRecordBuilder.java b/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedLogRecordBuilder.java index 4a18baa07ed..d6fde3699b1 100644 --- a/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedLogRecordBuilder.java +++ b/api/incubator/src/main/java/io/opentelemetry/api/incubator/logs/ExtendedLogRecordBuilder.java @@ -19,4 +19,7 @@ public interface ExtendedLogRecordBuilder extends LogRecordBuilder { * record with a non-empty event name is an Event. */ ExtendedLogRecordBuilder setEventName(String eventName); + + /** Set standard {@code exception.*} attributes based on the {@code throwable}. */ + ExtendedLogRecordBuilder setException(Throwable throwable); } diff --git a/sdk/common/src/main/java/io/opentelemetry/sdk/internal/AttributeUtil.java b/sdk/common/src/main/java/io/opentelemetry/sdk/internal/AttributeUtil.java index de7fac88eba..e0fc9b56b90 100644 --- a/sdk/common/src/main/java/io/opentelemetry/sdk/internal/AttributeUtil.java +++ b/sdk/common/src/main/java/io/opentelemetry/sdk/internal/AttributeUtil.java @@ -8,9 +8,12 @@ import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.common.AttributesBuilder; +import java.io.PrintWriter; +import java.io.StringWriter; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.function.BiConsumer; import java.util.function.Predicate; /** @@ -19,6 +22,13 @@ */ public final class AttributeUtil { + private static final AttributeKey EXCEPTION_TYPE = + AttributeKey.stringKey("exception.type"); + private static final AttributeKey EXCEPTION_MESSAGE = + AttributeKey.stringKey("exception.message"); + private static final AttributeKey EXCEPTION_STACKTRACE = + AttributeKey.stringKey("exception.stacktrace"); + private AttributeUtil() {} /** @@ -95,4 +105,26 @@ public static Object applyAttributeLengthLimit(Object value, int lengthLimit) { } return value; } + + public static void addExceptionAttributes( + Throwable exception, BiConsumer, String> attributeConsumer) { + String exceptionType = exception.getClass().getCanonicalName(); + if (exceptionType != null) { + attributeConsumer.accept(EXCEPTION_TYPE, exceptionType); + } + + String exceptionMessage = exception.getMessage(); + if (exceptionMessage != null) { + attributeConsumer.accept(EXCEPTION_MESSAGE, exceptionMessage); + } + + StringWriter stringWriter = new StringWriter(); + try (PrintWriter printWriter = new PrintWriter(stringWriter)) { + exception.printStackTrace(printWriter); + } + String stackTrace = stringWriter.toString(); + if (stackTrace != null) { + attributeConsumer.accept(EXCEPTION_STACKTRACE, stackTrace); + } + } } diff --git a/sdk/logs/build.gradle.kts b/sdk/logs/build.gradle.kts index c0c740d3743..b205b03e90e 100644 --- a/sdk/logs/build.gradle.kts +++ b/sdk/logs/build.gradle.kts @@ -28,6 +28,7 @@ testing { dependencies { implementation(project(":sdk:testing")) implementation(project(":api:incubator")) + implementation("io.opentelemetry.semconv:opentelemetry-semconv-incubating") implementation("com.google.guava:guava") } } 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 9f874d1f4b3..97f337cc194 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 @@ -29,6 +29,12 @@ public ExtendedSdkLogRecordBuilder setEventName(String eventName) { return this; } + @Override + public ExtendedSdkLogRecordBuilder setException(Throwable throwable) { + super.setException(throwable); + return this; + } + @Override public ExtendedSdkLogRecordBuilder setTimestamp(long timestamp, TimeUnit unit) { super.setTimestamp(timestamp, unit); diff --git a/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/SdkLogRecordBuilder.java b/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/SdkLogRecordBuilder.java index da7e1f45e7e..a73f4aa681b 100644 --- a/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/SdkLogRecordBuilder.java +++ b/sdk/logs/src/main/java/io/opentelemetry/sdk/logs/SdkLogRecordBuilder.java @@ -12,6 +12,7 @@ import io.opentelemetry.api.trace.Span; import io.opentelemetry.context.Context; import io.opentelemetry.sdk.common.InstrumentationScopeInfo; +import io.opentelemetry.sdk.internal.AttributeUtil; import io.opentelemetry.sdk.internal.AttributesMap; import java.time.Instant; import java.util.concurrent.TimeUnit; @@ -46,6 +47,17 @@ SdkLogRecordBuilder setEventName(String eventName) { return this; } + // accessible via ExtendedSdkLogRecordBuilder + SdkLogRecordBuilder setException(Throwable throwable) { + if (throwable == null) { + return this; + } + + AttributeUtil.addExceptionAttributes(throwable, this::setAttribute); + + return this; + } + @Override public SdkLogRecordBuilder setTimestamp(long timestamp, TimeUnit unit) { this.timestampEpochNanos = unit.toNanos(timestamp); diff --git a/sdk/logs/src/testIncubating/java/io/opentelemetry/sdk/logs/ExtendedLoggerBuilderTest.java b/sdk/logs/src/testIncubating/java/io/opentelemetry/sdk/logs/ExtendedLoggerBuilderTest.java new file mode 100644 index 00000000000..3b166f8a163 --- /dev/null +++ b/sdk/logs/src/testIncubating/java/io/opentelemetry/sdk/logs/ExtendedLoggerBuilderTest.java @@ -0,0 +1,48 @@ +/* + * Copyright The OpenTelemetry Authors + * SPDX-License-Identifier: Apache-2.0 + */ + +package io.opentelemetry.sdk.logs; + +import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; +import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo; +import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.satisfies; +import static io.opentelemetry.semconv.ExceptionAttributes.EXCEPTION_MESSAGE; +import static io.opentelemetry.semconv.ExceptionAttributes.EXCEPTION_STACKTRACE; +import static io.opentelemetry.semconv.ExceptionAttributes.EXCEPTION_TYPE; + +import io.opentelemetry.api.incubator.logs.ExtendedLogRecordBuilder; +import io.opentelemetry.api.logs.Logger; +import io.opentelemetry.sdk.logs.export.SimpleLogRecordProcessor; +import io.opentelemetry.sdk.testing.exporter.InMemoryLogRecordExporter; +import org.junit.jupiter.api.Test; + +class ExtendedLoggerBuilderTest { + + private final InMemoryLogRecordExporter exporter = InMemoryLogRecordExporter.create(); + private final SdkLoggerProviderBuilder loggerProviderBuilder = + SdkLoggerProvider.builder().addLogRecordProcessor(SimpleLogRecordProcessor.create(exporter)); + + @Test + void setException() { + Logger logger = loggerProviderBuilder.build().get("logger"); + + ((ExtendedLogRecordBuilder) logger.logRecordBuilder()) + .setException(new Exception("error")) + .emit(); + + assertThat(exporter.getFinishedLogRecordItems()) + .satisfiesExactly( + logRecord -> + assertThat(logRecord) + .hasAttributesSatisfyingExactly( + equalTo(EXCEPTION_TYPE, "java.lang.Exception"), + equalTo(EXCEPTION_MESSAGE, "error"), + satisfies( + EXCEPTION_STACKTRACE, + stacktrace -> + stacktrace.startsWith( + "java.lang.Exception: error" + System.lineSeparator())))); + } +} diff --git a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkSpan.java b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkSpan.java index c1c788bf931..30ee4bbdebf 100644 --- a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkSpan.java +++ b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkSpan.java @@ -25,8 +25,6 @@ import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; import io.opentelemetry.sdk.trace.internal.ExtendedSpanProcessor; -import java.io.PrintWriter; -import java.io.StringWriter; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -117,13 +115,6 @@ private enum EndState { @Nullable private Thread spanEndingThread; - private static final AttributeKey EXCEPTION_TYPE = - AttributeKey.stringKey("exception.type"); - private static final AttributeKey EXCEPTION_MESSAGE = - AttributeKey.stringKey("exception.message"); - private static final AttributeKey EXCEPTION_STACKTRACE = - AttributeKey.stringKey("exception.stacktrace"); - private SdkSpan( SpanContext context, String name, @@ -466,7 +457,6 @@ public ReadWriteSpan recordException(Throwable exception) { } @Override - @SuppressWarnings("unchecked") public ReadWriteSpan recordException(Throwable exception, Attributes additionalAttributes) { if (exception == null) { return this; @@ -478,23 +468,8 @@ public ReadWriteSpan recordException(Throwable exception, Attributes additionalA AttributesMap attributes = AttributesMap.create( spanLimits.getMaxNumberOfAttributes(), spanLimits.getMaxAttributeValueLength()); - String exceptionName = exception.getClass().getCanonicalName(); - String exceptionMessage = exception.getMessage(); - StringWriter stringWriter = new StringWriter(); - try (PrintWriter printWriter = new PrintWriter(stringWriter)) { - exception.printStackTrace(printWriter); - } - String stackTrace = stringWriter.toString(); - if (exceptionName != null) { - attributes.put(EXCEPTION_TYPE, exceptionName); - } - if (exceptionMessage != null) { - attributes.put(EXCEPTION_MESSAGE, exceptionMessage); - } - if (stackTrace != null) { - attributes.put(EXCEPTION_STACKTRACE, stackTrace); - } + AttributeUtil.addExceptionAttributes(exception, attributes::put); additionalAttributes.forEach(attributes::put); diff --git a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracerProviderBuilder.java b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracerProviderBuilder.java index 531cd1a6384..f20374cb6fb 100644 --- a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracerProviderBuilder.java +++ b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/SdkTracerProviderBuilder.java @@ -7,6 +7,7 @@ import static java.util.Objects.requireNonNull; +import io.opentelemetry.api.trace.Span; import io.opentelemetry.sdk.common.Clock; import io.opentelemetry.sdk.common.InstrumentationScopeInfo; import io.opentelemetry.sdk.internal.ScopeConfigurator; @@ -36,8 +37,8 @@ public final class SdkTracerProviderBuilder { TracerConfig.configuratorBuilder(); /** - * Assign a {@link Clock}. {@link Clock} will be used each time a {@link - * io.opentelemetry.api.trace.Span} is started, ended or any event is recorded. + * Assign a {@link Clock}. {@link Clock} will be used each time a {@link Span} is started, ended + * or any event is recorded. * *

The {@code clock} must be thread-safe and return immediately (no remote calls, as contention * free as possible). @@ -52,8 +53,8 @@ public SdkTracerProviderBuilder setClock(Clock clock) { } /** - * Assign an {@link IdGenerator}. {@link IdGenerator} will be used each time a {@link - * io.opentelemetry.api.trace.Span} is started. + * Assign an {@link IdGenerator}. {@link IdGenerator} will be used each time a {@link Span} is + * started. * *

The {@code idGenerator} must be thread-safe and return immediately (no remote calls, as * contention free as possible). @@ -97,8 +98,7 @@ public SdkTracerProviderBuilder addResource(Resource resource) { *

This method is equivalent to calling {@link #setSpanLimits(Supplier)} like this {@code * #setSpanLimits(() -> spanLimits)}. * - * @param spanLimits the limits that will be used for every {@link - * io.opentelemetry.api.trace.Span}. + * @param spanLimits the limits that will be used for every {@link Span}. * @return this */ public SdkTracerProviderBuilder setSpanLimits(SpanLimits spanLimits) { @@ -109,13 +109,13 @@ public SdkTracerProviderBuilder setSpanLimits(SpanLimits spanLimits) { /** * Assign a {@link Supplier} of {@link SpanLimits}. {@link SpanLimits} will be retrieved each time - * a {@link io.opentelemetry.api.trace.Span} is started. + * a {@link Span} is started. * *

The {@code spanLimitsSupplier} must be thread-safe and return immediately (no remote calls, * as contention free as possible). * * @param spanLimitsSupplier the supplier that will be used to retrieve the {@link SpanLimits} for - * every {@link io.opentelemetry.api.trace.Span}. + * every {@link Span}. * @return this */ public SdkTracerProviderBuilder setSpanLimits(Supplier spanLimitsSupplier) { @@ -126,7 +126,7 @@ public SdkTracerProviderBuilder setSpanLimits(Supplier spanLimitsSup /** * Assign a {@link Sampler} to use for sampling traces. {@link Sampler} will be called each time a - * {@link io.opentelemetry.api.trace.Span} is started. + * {@link Span} is started. * *

The {@code sampler} must be thread-safe and return immediately (no remote calls, as * contention free as possible). @@ -142,7 +142,7 @@ public SdkTracerProviderBuilder setSampler(Sampler sampler) { /** * Add a SpanProcessor to the span pipeline that will be built. {@link SpanProcessor} will be - * called each time a {@link io.opentelemetry.api.trace.Span} is started or ended. + * called each time a {@link Span} is started or ended. * *

The {@code spanProcessor} must be thread-safe and return immediately (no remote calls, as * contention free as possible). diff --git a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/TracerSharedState.java b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/TracerSharedState.java index 3d07a2853f8..37bb6675c06 100644 --- a/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/TracerSharedState.java +++ b/sdk/trace/src/main/java/io/opentelemetry/sdk/trace/TracerSharedState.java @@ -42,7 +42,7 @@ final class TracerSharedState { this.resource = resource; this.spanLimitsSupplier = spanLimitsSupplier; this.sampler = sampler; - activeSpanProcessor = SpanProcessor.composite(spanProcessors); + this.activeSpanProcessor = SpanProcessor.composite(spanProcessors); } Clock getClock() { diff --git a/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanTest.java b/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanTest.java index fb387cf2a18..625313dbcb5 100644 --- a/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanTest.java +++ b/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkSpanTest.java @@ -13,8 +13,8 @@ import static io.opentelemetry.api.common.AttributeKey.longKey; import static io.opentelemetry.api.common.AttributeKey.stringArrayKey; import static io.opentelemetry.api.common.AttributeKey.stringKey; +import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; import static java.util.stream.Collectors.joining; -import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.ArgumentMatchers.any; @@ -1534,9 +1534,7 @@ void testAsSpanData() { Resource resource = this.resource; Attributes attributes = TestUtils.generateRandomAttributes(); AttributesMap attributesWithCapacity = AttributesMap.create(32, Integer.MAX_VALUE); - attributes.forEach( - (attributeKey, object) -> - attributesWithCapacity.put((AttributeKey) attributeKey, object)); + attributes.forEach(attributesWithCapacity::put); Attributes event1Attributes = TestUtils.generateRandomAttributes(); Attributes event2Attributes = TestUtils.generateRandomAttributes(); SpanContext context = diff --git a/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkTracerProviderTest.java b/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkTracerProviderTest.java index 61b64b4ebdf..578fd9099ee 100644 --- a/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkTracerProviderTest.java +++ b/sdk/trace/src/test/java/io/opentelemetry/sdk/trace/SdkTracerProviderTest.java @@ -38,11 +38,11 @@ @MockitoSettings(strictness = Strictness.LENIENT) class SdkTracerProviderTest { @Mock private SpanProcessor spanProcessor; - private SdkTracerProvider tracerFactory; + private SdkTracerProvider tracerProvider; @BeforeEach void setUp() { - tracerFactory = SdkTracerProvider.builder().addSpanProcessor(spanProcessor).build(); + tracerProvider = SdkTracerProvider.builder().addSpanProcessor(spanProcessor).build(); when(spanProcessor.forceFlush()).thenReturn(CompletableResultCode.ofSuccess()); when(spanProcessor.shutdown()).thenReturn(CompletableResultCode.ofSuccess()); } @@ -137,34 +137,35 @@ void builder_NullIdsGenerator() { @Test void defaultGet() { - assertThat(tracerFactory.get("test")).isInstanceOf(SdkTracer.class); + assertThat(tracerProvider.get("test")).isInstanceOf(SdkTracer.class); } @Test void getSameInstanceForSameName_WithoutVersion() { - assertThat(tracerFactory.get("test")).isSameAs(tracerFactory.get("test")); - assertThat(tracerFactory.get("test")) - .isSameAs(tracerFactory.get("test", null)) - .isSameAs(tracerFactory.tracerBuilder("test").build()); + assertThat(tracerProvider.get("test")).isSameAs(tracerProvider.get("test")); + assertThat(tracerProvider.get("test")) + .isSameAs(tracerProvider.get("test", null)) + .isSameAs(tracerProvider.tracerBuilder("test").build()); } @Test void getSameInstanceForSameName_WithVersion() { - assertThat(tracerFactory.get("test", "version")) - .isSameAs(tracerFactory.get("test", "version")) - .isSameAs(tracerFactory.tracerBuilder("test").setInstrumentationVersion("version").build()); + assertThat(tracerProvider.get("test", "version")) + .isSameAs(tracerProvider.get("test", "version")) + .isSameAs( + tracerProvider.tracerBuilder("test").setInstrumentationVersion("version").build()); } @Test void getSameInstanceForSameName_WithVersionAndSchema() { assertThat( - tracerFactory + tracerProvider .tracerBuilder("test") .setInstrumentationVersion("version") .setSchemaUrl("http://url") .build()) .isSameAs( - tracerFactory + tracerProvider .tracerBuilder("test") .setInstrumentationVersion("version") .setSchemaUrl("http://url") @@ -179,7 +180,7 @@ void propagatesInstrumentationScopeInfoToTracer() { .setSchemaUrl("http://url") .build(); Tracer tracer = - tracerFactory + tracerProvider .tracerBuilder(expected.getName()) .setInstrumentationVersion(expected.getVersion()) .setSchemaUrl(expected.getSchemaUrl()) @@ -198,7 +199,7 @@ void propagatesEnablementToTracerByUtil() { } void propagatesEnablementToTracer(boolean directly) { - SdkTracer tracer = (SdkTracer) tracerFactory.get("test"); + SdkTracer tracer = (SdkTracer) tracerProvider.get("test"); boolean isEnabled = tracer.isEnabled(); ScopeConfigurator flipConfigurator = new ScopeConfigurator() { @@ -209,9 +210,9 @@ public TracerConfig apply(InstrumentationScopeInfo scopeInfo) { }; // all in the same thread, so should see enablement change immediately if (directly) { - tracerFactory.setTracerConfigurator(flipConfigurator); + tracerProvider.setTracerConfigurator(flipConfigurator); } else { - SdkTracerProviderUtil.setTracerConfigurator(tracerFactory, flipConfigurator); + SdkTracerProviderUtil.setTracerConfigurator(tracerProvider, flipConfigurator); } assertThat(tracer.isEnabled()).isEqualTo(!isEnabled); } @@ -227,57 +228,57 @@ void build_SpanLimits() { @Test void shutdown() { - tracerFactory.shutdown(); + tracerProvider.shutdown(); Mockito.verify(spanProcessor, Mockito.times(1)).shutdown(); } @Test void close() { - tracerFactory.close(); + tracerProvider.close(); Mockito.verify(spanProcessor, Mockito.times(1)).shutdown(); } @Test void forceFlush() { - tracerFactory.forceFlush(); + tracerProvider.forceFlush(); Mockito.verify(spanProcessor, Mockito.times(1)).forceFlush(); } @Test @SuppressLogger(SdkTracerProvider.class) void shutdownTwice_OnlyFlushSpanProcessorOnce() { - tracerFactory.shutdown(); + tracerProvider.shutdown(); Mockito.verify(spanProcessor, Mockito.times(1)).shutdown(); - tracerFactory.shutdown(); // the second call will be ignored + tracerProvider.shutdown(); // the second call will be ignored Mockito.verify(spanProcessor, Mockito.times(1)).shutdown(); } @Test void returnNoopSpanAfterShutdown() { - tracerFactory.shutdown(); - Span span = tracerFactory.get("noop").spanBuilder("span").startSpan(); + tracerProvider.shutdown(); + Span span = tracerProvider.get("noop").spanBuilder("span").startSpan(); assertThat(span.getSpanContext().isValid()).isFalse(); span.end(); } @Test void suppliesDefaultTracerForNullName() { - SdkTracer tracer = (SdkTracer) tracerFactory.get(null); + SdkTracer tracer = (SdkTracer) tracerProvider.get(null); assertThat(tracer.getInstrumentationScopeInfo().getName()) .isEqualTo(SdkTracerProvider.DEFAULT_TRACER_NAME); - tracer = (SdkTracer) tracerFactory.get(null, null); + tracer = (SdkTracer) tracerProvider.get(null, null); assertThat(tracer.getInstrumentationScopeInfo().getName()) .isEqualTo(SdkTracerProvider.DEFAULT_TRACER_NAME); } @Test void suppliesDefaultTracerForEmptyName() { - SdkTracer tracer = (SdkTracer) tracerFactory.get(""); + SdkTracer tracer = (SdkTracer) tracerProvider.get(""); assertThat(tracer.getInstrumentationScopeInfo().getName()) .isEqualTo(SdkTracerProvider.DEFAULT_TRACER_NAME); - tracer = (SdkTracer) tracerFactory.get("", ""); + tracer = (SdkTracer) tracerProvider.get("", ""); assertThat(tracer.getInstrumentationScopeInfo().getName()) .isEqualTo(SdkTracerProvider.DEFAULT_TRACER_NAME); }