diff --git a/core/src/test/java/io/opentelemetry/android/OpenTelemetryRumBuilderTest.java b/core/src/test/java/io/opentelemetry/android/OpenTelemetryRumBuilderTest.java index 8e7c1d702..6ada4aba7 100644 --- a/core/src/test/java/io/opentelemetry/android/OpenTelemetryRumBuilderTest.java +++ b/core/src/test/java/io/opentelemetry/android/OpenTelemetryRumBuilderTest.java @@ -44,9 +44,9 @@ import io.opentelemetry.android.internal.services.applifecycle.ApplicationStateListener; import io.opentelemetry.android.internal.services.visiblescreen.VisibleScreenService; import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.api.common.KeyValue; +import io.opentelemetry.api.common.Value; import io.opentelemetry.api.incubator.events.EventLogger; -import io.opentelemetry.api.incubator.logs.AnyValue; -import io.opentelemetry.api.incubator.logs.KeyAnyValue; import io.opentelemetry.api.logs.Logger; import io.opentelemetry.api.logs.LoggerBuilder; import io.opentelemetry.api.logs.LoggerProvider; @@ -61,7 +61,6 @@ import io.opentelemetry.sdk.logs.data.LogRecordData; import io.opentelemetry.sdk.logs.export.LogRecordExporter; import io.opentelemetry.sdk.logs.export.SimpleLogRecordProcessor; -import io.opentelemetry.sdk.logs.internal.AnyValueBody; import io.opentelemetry.sdk.logs.internal.SdkEventLoggerProvider; import io.opentelemetry.sdk.resources.Resource; import io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions; @@ -185,10 +184,10 @@ public void shouldBuildLogRecordProvider() { equalTo(stringKey("mega"), "hit")) .hasResource(resource); - AnyValue bodyValue = ((AnyValueBody) logs.get(0).getBody()).asAnyValue(); - List payload = (List) bodyValue.getValue(); + Value bodyValue = logs.get(0).getBodyValue(); + List payload = (List) bodyValue.getValue(); assertThat(payload).hasSize(1); - KeyAnyValue expected = KeyAnyValue.of("body.field", AnyValue.of("foo")); + KeyValue expected = KeyValue.of("body.field", Value.of("foo")); assertThat(payload.get(0)).isEqualTo(expected); } diff --git a/demo-app/gradle/libs.versions.toml b/demo-app/gradle/libs.versions.toml index 5292af5af..d669cc63e 100644 --- a/demo-app/gradle/libs.versions.toml +++ b/demo-app/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -opentelemetry = "1.41.0" +opentelemetry = "1.42.0" opentelemetry-alpha = "1.39.0-alpha" junit = "5.11.0" spotless = "6.25.0" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3d87b8305..0166cf0fb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -opentelemetry = "1.41.0" -opentelemetry-alpha = "1.41.0-alpha" +opentelemetry = "1.42.1" +opentelemetry-alpha = "1.42.1-alpha" opentelemetry-instrumentation = "2.7.0" opentelemetry-instrumentation-alpha = "2.7.0-alpha" opentelemetry-semconv = "1.25.0-alpha" diff --git a/instrumentation/startup/src/main/java/io/opentelemetry/android/instrumentation/startup/SdkInitializationEvents.kt b/instrumentation/startup/src/main/java/io/opentelemetry/android/instrumentation/startup/SdkInitializationEvents.kt index 67a374659..728b8bb9e 100644 --- a/instrumentation/startup/src/main/java/io/opentelemetry/android/instrumentation/startup/SdkInitializationEvents.kt +++ b/instrumentation/startup/src/main/java/io/opentelemetry/android/instrumentation/startup/SdkInitializationEvents.kt @@ -12,7 +12,7 @@ import io.opentelemetry.android.internal.initialization.InitializationEvents import io.opentelemetry.api.OpenTelemetry import io.opentelemetry.api.common.AttributeKey import io.opentelemetry.api.common.Attributes -import io.opentelemetry.api.incubator.logs.AnyValue +import io.opentelemetry.api.common.Value import io.opentelemetry.sdk.logs.internal.SdkEventLoggerProvider import io.opentelemetry.sdk.trace.export.SpanExporter import java.time.Instant @@ -78,7 +78,7 @@ class SdkInitializationEvents(private val clock: Supplier = Supplier { private fun addEvent( name: String, attr: Attributes? = null, - body: AnyValue<*>? = null, + body: Value<*>? = null, ) { events.add(Event(clock.get(), name, attr, body)) } @@ -87,6 +87,6 @@ class SdkInitializationEvents(private val clock: Supplier = Supplier { val timestamp: Instant, val name: String, val attributes: Attributes?, - val body: AnyValue<*>? = null, + val body: Value<*>? = null, ) }