diff --git a/sample-app/src/main/java/com/splunk/android/sample/DemoWorker.java b/sample-app/src/main/java/com/splunk/android/sample/DemoWorker.java index 33691503..e7566ba8 100644 --- a/sample-app/src/main/java/com/splunk/android/sample/DemoWorker.java +++ b/sample-app/src/main/java/com/splunk/android/sample/DemoWorker.java @@ -27,7 +27,7 @@ public class DemoWorker extends Worker { - private Context context; + private final Context context; public static final String TAG = "SplunkRum"; public DemoWorker(@NonNull Context context, @NonNull WorkerParameters params) { diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java index cd39b81f..2346f29b 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackExceptionTest.java @@ -27,9 +27,6 @@ import io.opentelemetry.sdk.testing.junit4.OpenTelemetryRule; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.semconv.ExceptionAttributes; -import io.opentelemetry.semconv.SemanticAttributes; -import io.opentelemetry.semconv.incubating.ExceptionIncubatingAttributes; - import java.util.List; import java.util.concurrent.TimeUnit; import org.junit.After; @@ -84,7 +81,8 @@ public void spanDecoration_error() { a -> assertThat(a) .containsEntry( - ExceptionAttributes.EXCEPTION_TYPE, + ExceptionAttributes + .EXCEPTION_TYPE, "java.lang.RuntimeException") .containsEntry( ExceptionAttributes diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java index c7bedc0a..8fef0f88 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/TracingHurlStackTest.java @@ -17,7 +17,7 @@ package com.splunk.rum; import static io.opentelemetry.semconv.HttpAttributes.HTTP_RESPONSE_STATUS_CODE; -import static io.opentelemetry.semconv.SemanticAttributes.HTTP_RESPONSE_BODY_SIZE; +import static io.opentelemetry.semconv.incubating.HttpIncubatingAttributes.HTTP_RESPONSE_BODY_SIZE; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.assertj.core.api.Fail.fail; @@ -37,12 +37,8 @@ import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.data.StatusData; import io.opentelemetry.semconv.HttpAttributes; -import io.opentelemetry.semconv.NetworkAttributes; -import io.opentelemetry.semconv.SemanticAttributes; import io.opentelemetry.semconv.ServerAttributes; import io.opentelemetry.semconv.UrlAttributes; -import io.opentelemetry.semconv.incubating.HttpIncubatingAttributes; - import java.io.IOException; import java.net.ServerSocket; import java.net.URL; diff --git a/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyContentLengthAttributesExtractorTest.java b/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyContentLengthAttributesExtractorTest.java index 72748b01..4d294d73 100644 --- a/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyContentLengthAttributesExtractorTest.java +++ b/splunk-otel-android-volley/src/test/java/com/splunk/rum/VolleyContentLengthAttributesExtractorTest.java @@ -16,7 +16,7 @@ package com.splunk.rum; -import static io.opentelemetry.semconv.SemanticAttributes.HTTP_RESPONSE_BODY_SIZE; +import static io.opentelemetry.semconv.incubating.HttpIncubatingAttributes.HTTP_RESPONSE_BODY_SIZE; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java index 506f5c72..0b5728bf 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkScreenNameExtractor.java @@ -27,7 +27,7 @@ */ class SplunkScreenNameExtractor implements ScreenNameExtractor { - static ScreenNameExtractor INSTANCE = new SplunkScreenNameExtractor(); + static final ScreenNameExtractor INSTANCE = new SplunkScreenNameExtractor(); private SplunkScreenNameExtractor() {} diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java index 073f38d4..78be3fb1 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/SplunkSpanDataModifier.java @@ -48,12 +48,9 @@ import io.opentelemetry.sdk.trace.data.EventData; import io.opentelemetry.sdk.trace.data.SpanData; import io.opentelemetry.sdk.trace.export.SpanExporter; -import io.opentelemetry.semconv.ResourceAttributes; -import io.opentelemetry.semconv.SemanticAttributes; import io.opentelemetry.semconv.incubating.DeploymentIncubatingAttributes; import io.opentelemetry.semconv.incubating.DeviceIncubatingAttributes; import io.opentelemetry.semconv.incubating.OsIncubatingAttributes; - import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; diff --git a/splunk-otel-android/src/main/java/com/splunk/rum/StandardAttributes.java b/splunk-otel-android/src/main/java/com/splunk/rum/StandardAttributes.java index 8da64b09..29b3fc2c 100644 --- a/splunk-otel-android/src/main/java/com/splunk/rum/StandardAttributes.java +++ b/splunk-otel-android/src/main/java/com/splunk/rum/StandardAttributes.java @@ -35,7 +35,7 @@ public final class StandardAttributes { */ public static final AttributeKey APP_VERSION = stringKey("app.version"); - public final static String EXCEPTION_EVENT_NAME = "exception"; + public static final String EXCEPTION_EVENT_NAME = "exception"; /** * The build type of your app (typically one of debug or release). Useful for adding to global