diff --git a/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/arch/schema/EmbType.kt b/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/arch/schema/EmbType.kt index a3ae7a6028..c43de8523a 100644 --- a/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/arch/schema/EmbType.kt +++ b/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/arch/schema/EmbType.kt @@ -26,7 +26,7 @@ sealed class EmbType(type: String, subtype: String?) : TelemetryType { object ThermalState : Performance("thermal_state") - object ActivityOpen : Performance("activity_open") + object UiLoad : Performance("ui_load") } /** diff --git a/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilder.kt b/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilder.kt index 6e8d8060fc..59dec00240 100644 --- a/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilder.kt +++ b/embrace-android-core/src/main/kotlin/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilder.kt @@ -85,7 +85,7 @@ class EmbraceSpanBuilder( } private fun updateKeySpan() { - if (fixedAttributes.contains(EmbType.Performance.Default) || fixedAttributes.contains(EmbType.Performance.ActivityOpen)) { + if (fixedAttributes.contains(EmbType.Performance.Default) || fixedAttributes.contains(EmbType.Performance.UiLoad)) { if (getParentSpan() == null) { fixedAttributes.add(KeySpan) } else { diff --git a/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilderTest.kt b/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilderTest.kt index ec273cee5f..a354bf3678 100644 --- a/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilderTest.kt +++ b/embrace-android-core/src/test/java/io/embrace/android/embracesdk/internal/spans/EmbraceSpanBuilderTest.kt @@ -156,7 +156,7 @@ internal class EmbraceSpanBuilderTest { } @Test - fun `perf and activity_open spans are key spans if parent is null`() { + fun `perf and ui_load spans are key spans if parent is null`() { val perfSpanBuilder = EmbraceSpanBuilder( tracer = tracer, name = "test", @@ -171,7 +171,7 @@ internal class EmbraceSpanBuilderTest { val activityOpenSpanBuilder = EmbraceSpanBuilder( tracer = tracer, name = "test", - telemetryType = EmbType.Performance.ActivityOpen, + telemetryType = EmbType.Performance.UiLoad, internal = false, private = false, parentSpan = null, diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenType.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenType.kt deleted file mode 100644 index 135cf95b5a..0000000000 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenType.kt +++ /dev/null @@ -1,16 +0,0 @@ -package io.embrace.android.embracesdk.internal.capture.activity - -/** - * The type of activity opening being traced - */ -enum class OpenType(val typeName: String) { - /** - * Activity opening where the instance has to be created - */ - COLD("cold"), - - /** - * Activity opening where the instance has already been created and just needs to be started and resumed (e.g. app foregrounding) - */ - HOT("hot") -} diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenEvents.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadEvents.kt similarity index 73% rename from embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenEvents.kt rename to embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadEvents.kt index 595530012a..3953262e04 100644 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenEvents.kt +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadEvents.kt @@ -1,20 +1,21 @@ package io.embrace.android.embracesdk.internal.capture.activity /** - * The relevant stages in the lifecycle of Activities pertaining to observing the performance of their loading + * Relevant events in during the lifecycle of UI loading. Listeners to these events should gather the data and log + * the appropriate loading traces and spans given the associated Activity. */ -interface OpenEvents { +interface UiLoadEvents { /** - * When a previously in-progress Activity Open trace should be abandoned, and that the component managing - * the trace recording should prepare itself to start tracing the opening of a new Activity instance. + * When we no longer wish to observe the loading of the given Activity instance. This may be called during its load + * or after it has loaded. Calls to this for a given Activity instance is idempotent */ - fun resetTrace(instanceId: Int, activityName: String, timestampMs: Long) + fun abandon(instanceId: Int, activityName: String, timestampMs: Long) /** * When the app is no longer in a state where it is trying to open up a new Activity */ - fun hibernate(instanceId: Int, activityName: String, timestampMs: Long) + fun reset(instanceId: Int) /** * When the given Activity is entering the CREATE stage of its lifecycle. diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenTraceEmitter.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadTraceEmitter.kt similarity index 86% rename from embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenTraceEmitter.kt rename to embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadTraceEmitter.kt index 6f62d64af7..fc900ee3d0 100644 --- a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/OpenTraceEmitter.kt +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadTraceEmitter.kt @@ -11,13 +11,13 @@ import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.atomic.AtomicReference /** - * Observes Activity lifecycle and rendering events to create traces that model the workflow for showing an Activity on screen after - * app startup has completed. This creates traces for both types of Activity opening specified in [OpenType]. + * Observes [UiLoadEvents] to create traces that model the workflow for displaying UI on screen. + * This will record traces for all [UiLoadType] but will ignore any UI load that is part of the app startup workflow. * * Depending on the version of Android and the state of the app, the start, end, and intermediate stages of the workflow will use - * timestamps from different events, which affects the precision of the measurement. + * timestamps from different events, which affects the precision of the measurements as well as the child spans contained in the trace. * - * The start for [OpenType.COLD]: + * The start for [UiLoadType.COLD]: * * - On Android 10+, when [ActivityLifecycleCallbacks.onActivityPostPaused] is fired, denoting that the previous activity has completed * its [ActivityLifecycleCallbacks.onActivityPaused] callbacks and a new Activity is ready to be created. @@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicReference * process of exiting. This will possibly result in some cleanup work of exiting the previous activity being included in the duration * of the next trace that is logged. * - * The start for [OpenType.HOT] + * The start for [UiLoadType.HOT] * * - On Android 10+, when [ActivityLifecycleCallbacks.onActivityPreStarted] is fired, denoting that an existing Activity instance is ready * to be started @@ -35,29 +35,29 @@ import java.util.concurrent.atomic.AtomicReference * process of starting. This will possibly result in some of the work to start the activity already having happened depending on the * other callbacks that have been registered. * - * The end for both [OpenType.COLD] and [OpenType.HOT]: + * The end for both [UiLoadType.COLD] and [UiLoadType.HOT]: * * - Android 10+, when the Activity's first UI frame finishes rendering and is delivered to the screen * * - Android 9 and lower, when [ActivityLifecycleCallbacks.onActivityResumed] is fired. */ -class OpenTraceEmitter( +class UiLoadTraceEmitter( private val spanService: SpanService, private val versionChecker: VersionChecker, -) : OpenEvents { +) : UiLoadEvents { - private val activeTraces: MutableMap = ConcurrentHashMap() - private val traceZygoteHolder: AtomicReference = AtomicReference(INITIAL) + private val activeTraces: MutableMap = ConcurrentHashMap() + private val traceZygoteHolder: AtomicReference = AtomicReference(INITIAL) private var currentTracedInstanceId: Int? = null - override fun resetTrace(instanceId: Int, activityName: String, timestampMs: Long) { + override fun abandon(instanceId: Int, activityName: String, timestampMs: Long) { currentTracedInstanceId?.let { currentlyTracedInstanceId -> if (instanceId != currentlyTracedInstanceId) { endTrace(instanceId = currentlyTracedInstanceId, timestampMs = timestampMs, errorCode = ErrorCode.USER_ABANDON) } } traceZygoteHolder.set( - OpenTraceZygote( + UiLoadTraceZygote( lastActivityName = activityName, lastActivityInstanceId = instanceId, lastActivityPausedTimeMs = timestampMs @@ -65,7 +65,7 @@ class OpenTraceEmitter( ) } - override fun hibernate(instanceId: Int, activityName: String, timestampMs: Long) { + override fun reset(instanceId: Int) { if (traceZygoteHolder.get().lastActivityInstanceId == instanceId) { traceZygoteHolder.set(BACKGROUNDED) } @@ -73,7 +73,7 @@ class OpenTraceEmitter( override fun create(instanceId: Int, activityName: String, timestampMs: Long) { startTrace( - openType = OpenType.COLD, + uiLoadType = UiLoadType.COLD, instanceId = instanceId, activityName = activityName, timestampMs = timestampMs @@ -95,7 +95,7 @@ class OpenTraceEmitter( override fun start(instanceId: Int, activityName: String, timestampMs: Long) { startTrace( - openType = OpenType.HOT, + uiLoadType = UiLoadType.HOT, instanceId = instanceId, activityName = activityName, timestampMs = timestampMs @@ -160,7 +160,7 @@ class OpenTraceEmitter( } private fun startTrace( - openType: OpenType, + uiLoadType: UiLoadType, instanceId: Int, activityName: String, timestampMs: Long @@ -178,14 +178,14 @@ class OpenTraceEmitter( } spanService.startSpan( - name = traceName(activityName, openType), - type = EmbType.Performance.ActivityOpen, + name = traceName(activityName, uiLoadType), + type = EmbType.Performance.UiLoad, startTimeMs = startTimeMs, )?.let { root -> if (zygote.lastActivityInstanceId != -1) { root.addSystemAttribute("last_activity", zygote.lastActivityName) } - activeTraces[instanceId] = ActivityOpenTrace(root = root, activityName = activityName) + activeTraces[instanceId] = UiLoadTrace(root = root, activityName = activityName) } } } @@ -228,8 +228,8 @@ class OpenTraceEmitter( private fun traceName( activityName: String, - openType: OpenType - ): String = "$activityName-${openType.typeName}-open" + uiLoadType: UiLoadType + ): String = "$activityName-${uiLoadType.typeName}-open" enum class LifecycleEvent(private val typeName: String) { CREATE("create"), @@ -240,13 +240,13 @@ class OpenTraceEmitter( fun spanName(activityName: String): String = "$activityName-$typeName" } - private data class ActivityOpenTrace( + private data class UiLoadTrace( val activityName: String, val root: PersistableEmbraceSpan, val children: Map = ConcurrentHashMap(), ) - private data class OpenTraceZygote( + private data class UiLoadTraceZygote( val lastActivityName: String, val lastActivityInstanceId: Int, val lastActivityPausedTimeMs: Long, @@ -256,19 +256,19 @@ class OpenTraceEmitter( const val INVALID_INSTANCE: Int = -1 const val INVALID_TIME: Long = -1L - val INITIAL = OpenTraceZygote( + val INITIAL = UiLoadTraceZygote( lastActivityName = "NEW_APP_LAUNCH", lastActivityInstanceId = INVALID_INSTANCE, lastActivityPausedTimeMs = INVALID_TIME ) - val READY = OpenTraceZygote( + val READY = UiLoadTraceZygote( lastActivityName = "READY", lastActivityInstanceId = INVALID_INSTANCE, lastActivityPausedTimeMs = INVALID_TIME ) - val BACKGROUNDED = OpenTraceZygote( + val BACKGROUNDED = UiLoadTraceZygote( lastActivityName = "BACKGROUNDED", lastActivityInstanceId = INVALID_INSTANCE, lastActivityPausedTimeMs = INVALID_TIME diff --git a/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadType.kt b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadType.kt new file mode 100644 index 0000000000..853d7d8c4c --- /dev/null +++ b/embrace-android-features/src/main/kotlin/io/embrace/android/embracesdk/internal/capture/activity/UiLoadType.kt @@ -0,0 +1,16 @@ +package io.embrace.android.embracesdk.internal.capture.activity + +/** + * The type of UI load being traced + */ +enum class UiLoadType(val typeName: String) { + /** + * Load where the Activity instance has to be created + */ + COLD("cold"), + + /** + * Load where the instance has already been created and just needs to be started and resumed (e.g. foregrounding) + */ + HOT("hot") +} diff --git a/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/capture/activity/OpenTraceEmitterTest.kt b/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/capture/activity/UiLoadTraceEmitterTest.kt similarity index 86% rename from embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/capture/activity/OpenTraceEmitterTest.kt rename to embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/capture/activity/UiLoadTraceEmitterTest.kt index b76a590b29..f9ba0ffdcc 100644 --- a/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/capture/activity/OpenTraceEmitterTest.kt +++ b/embrace-android-features/src/test/java/io/embrace/android/embracesdk/internal/capture/activity/UiLoadTraceEmitterTest.kt @@ -20,11 +20,11 @@ import kotlin.math.max import kotlin.math.min @RunWith(AndroidJUnit4::class) -internal class OpenTraceEmitterTest { +internal class UiLoadTraceEmitterTest { private lateinit var clock: FakeClock private lateinit var spanSink: SpanSink private lateinit var spanService: SpanService - private lateinit var traceEmitter: OpenTraceEmitter + private lateinit var traceEmitter: UiLoadTraceEmitter @Before fun setUp() { @@ -34,7 +34,7 @@ internal class OpenTraceEmitterTest { spanService = initModule.openTelemetryModule.spanService spanService.initializeService(clock.now()) clock.tick(100L) - traceEmitter = OpenTraceEmitter( + traceEmitter = UiLoadTraceEmitter( spanService = spanService, versionChecker = BuildVersionChecker, ) @@ -45,7 +45,7 @@ internal class OpenTraceEmitterTest { fun `verify cold open trace from another activity in U`() { verifyOpen( previousState = PreviousState.FROM_ACTIVITY, - openType = OpenType.COLD, + uiLoadType = UiLoadType.COLD, firePreAndPost = true, hasRenderEvent = true, ) @@ -57,7 +57,7 @@ internal class OpenTraceEmitterTest { verifyOpen( lastActivityName = ACTIVITY_NAME, previousState = PreviousState.FROM_ACTIVITY, - openType = OpenType.COLD, + uiLoadType = UiLoadType.COLD, firePreAndPost = true, hasRenderEvent = true, ) @@ -68,8 +68,8 @@ internal class OpenTraceEmitterTest { @Test fun `verify cold open trace from an interrupted opening of another activity in U`() { verifyOpen( - previousState = PreviousState.FROM_INTERRUPTED_ACTIVITY_OPEN, - openType = OpenType.COLD, + previousState = PreviousState.FROM_INTERRUPTED_LOAD, + uiLoadType = UiLoadType.COLD, firePreAndPost = true, hasRenderEvent = true, ) @@ -81,8 +81,8 @@ internal class OpenTraceEmitterTest { fun `verify cold open trace from an interrupted opening of the same activity in U`() { verifyOpen( lastActivityName = ACTIVITY_NAME, - previousState = PreviousState.FROM_INTERRUPTED_ACTIVITY_OPEN, - openType = OpenType.COLD, + previousState = PreviousState.FROM_INTERRUPTED_LOAD, + uiLoadType = UiLoadType.COLD, firePreAndPost = true, hasRenderEvent = true, ) @@ -93,7 +93,7 @@ internal class OpenTraceEmitterTest { fun `verify cold open trace from background in U`() { verifyOpen( previousState = PreviousState.FROM_BACKGROUND, - openType = OpenType.COLD, + uiLoadType = UiLoadType.COLD, firePreAndPost = true, hasRenderEvent = true, ) @@ -104,7 +104,7 @@ internal class OpenTraceEmitterTest { fun `verify hot open trace in from background in U`() { verifyOpen( previousState = PreviousState.FROM_BACKGROUND, - openType = OpenType.HOT, + uiLoadType = UiLoadType.HOT, firePreAndPost = true, hasRenderEvent = true, ) @@ -115,7 +115,7 @@ internal class OpenTraceEmitterTest { fun `verify cold open trace in from another activity L`() { verifyOpen( previousState = PreviousState.FROM_ACTIVITY, - openType = OpenType.COLD, + uiLoadType = UiLoadType.COLD, firePreAndPost = false, hasRenderEvent = false, ) @@ -126,7 +126,7 @@ internal class OpenTraceEmitterTest { fun `verify cold open trace from background in L`() { verifyOpen( previousState = PreviousState.FROM_BACKGROUND, - openType = OpenType.COLD, + uiLoadType = UiLoadType.COLD, firePreAndPost = false, hasRenderEvent = false, ) @@ -137,7 +137,7 @@ internal class OpenTraceEmitterTest { fun `verify hot open trace in L from background`() { verifyOpen( previousState = PreviousState.FROM_BACKGROUND, - openType = OpenType.HOT, + uiLoadType = UiLoadType.HOT, firePreAndPost = false, hasRenderEvent = false, ) @@ -149,7 +149,7 @@ internal class OpenTraceEmitterTest { lastActivityName: String = LAST_ACTIVITY_NAME, lastInstanceId: Int = LAST_ACTIVITY_INSTANCE_ID, previousState: PreviousState, - openType: OpenType, + uiLoadType: UiLoadType, firePreAndPost: Boolean, hasRenderEvent: Boolean, ) { @@ -159,12 +159,12 @@ internal class OpenTraceEmitterTest { lastActivityName = lastActivityName, lastInstanceId = lastInstanceId, previousState = previousState, - openType = openType, + uiLoadType = uiLoadType, firePreAndPost = firePreAndPost, hasRenderEvent = hasRenderEvent ).let { timestamps -> val spanMap = spanSink.completedSpans().associateBy { it.name } - val trace = checkNotNull(spanMap["emb-$activityName-${openType.typeName}-open"]) + val trace = checkNotNull(spanMap["emb-$activityName-${uiLoadType.typeName}-open"]) assertEmbraceSpanData( span = trace.toNewPayload(), @@ -175,8 +175,8 @@ internal class OpenTraceEmitterTest { ) val events = timestamps.third - if (openType == OpenType.COLD) { - checkNotNull(events[OpenTraceEmitter.LifecycleEvent.CREATE]).run { + if (uiLoadType == UiLoadType.COLD) { + checkNotNull(events[UiLoadTraceEmitter.LifecycleEvent.CREATE]).run { assertEmbraceSpanData( span = checkNotNull(spanMap["emb-$activityName-create"]).toNewPayload(), expectedStartTimeMs = startMs(), @@ -188,7 +188,7 @@ internal class OpenTraceEmitterTest { assertNull(spanMap["emb-$activityName-create"]) } - checkNotNull(events[OpenTraceEmitter.LifecycleEvent.START]).run { + checkNotNull(events[UiLoadTraceEmitter.LifecycleEvent.START]).run { assertEmbraceSpanData( span = checkNotNull(spanMap["emb-$activityName-start"]).toNewPayload(), expectedStartTimeMs = startMs(), @@ -198,7 +198,7 @@ internal class OpenTraceEmitterTest { } if (hasRenderEvent) { - checkNotNull(events[OpenTraceEmitter.LifecycleEvent.RESUME]).run { + checkNotNull(events[UiLoadTraceEmitter.LifecycleEvent.RESUME]).run { assertEmbraceSpanData( span = checkNotNull(spanMap["emb-$activityName-resume"]).toNewPayload(), expectedStartTimeMs = startMs(), @@ -206,7 +206,7 @@ internal class OpenTraceEmitterTest { expectedParentId = trace.spanId ) } - checkNotNull(events[OpenTraceEmitter.LifecycleEvent.RENDER]).run { + checkNotNull(events[UiLoadTraceEmitter.LifecycleEvent.RENDER]).run { assertEmbraceSpanData( span = checkNotNull(spanMap["emb-$activityName-render"]).toNewPayload(), expectedStartTimeMs = startMs(), @@ -228,25 +228,25 @@ internal class OpenTraceEmitterTest { lastActivityName: String, lastInstanceId: Int, previousState: PreviousState, - openType: OpenType, + uiLoadType: UiLoadType, firePreAndPost: Boolean, hasRenderEvent: Boolean, - ): Triple> { - val events = mutableMapOf() + ): Triple> { + val events = mutableMapOf() val lastActivityExitMs = clock.now() clock.tick(100L) when (previousState) { PreviousState.FROM_ACTIVITY -> { - traceEmitter.resetTrace(lastInstanceId, lastActivityName, lastActivityExitMs) + traceEmitter.abandon(lastInstanceId, lastActivityName, lastActivityExitMs) } PreviousState.FROM_BACKGROUND -> { - traceEmitter.resetTrace(lastInstanceId, lastActivityName, lastActivityExitMs) - traceEmitter.hibernate(lastInstanceId, lastActivityName, clock.now()) + traceEmitter.abandon(lastInstanceId, lastActivityName, lastActivityExitMs) + traceEmitter.reset(lastInstanceId) } - PreviousState.FROM_INTERRUPTED_ACTIVITY_OPEN -> { + PreviousState.FROM_INTERRUPTED_LOAD -> { activityCreate( activityName = lastActivityName, instanceId = lastInstanceId, @@ -260,7 +260,7 @@ internal class OpenTraceEmitterTest { } } - val createEvents = if (openType == OpenType.COLD) { + val createEvents = if (uiLoadType == UiLoadType.COLD) { activityCreate( activityName = activityName, instanceId = instanceId, @@ -269,7 +269,7 @@ internal class OpenTraceEmitterTest { } else { null }?.apply { - events[OpenTraceEmitter.LifecycleEvent.CREATE] = this + events[UiLoadTraceEmitter.LifecycleEvent.CREATE] = this } val startEvents = activityStart( @@ -277,7 +277,7 @@ internal class OpenTraceEmitterTest { instanceId = instanceId, firePreAndPost = firePreAndPost ).apply { - events[OpenTraceEmitter.LifecycleEvent.START] = this + events[UiLoadTraceEmitter.LifecycleEvent.START] = this } val resumeEvents = activityResume( @@ -285,7 +285,7 @@ internal class OpenTraceEmitterTest { instanceId = instanceId, firePreAndPost = firePreAndPost ).apply { - events[OpenTraceEmitter.LifecycleEvent.RESUME] = this + events[UiLoadTraceEmitter.LifecycleEvent.RESUME] = this } val renderEvents = if (hasRenderEvent) { @@ -297,7 +297,7 @@ internal class OpenTraceEmitterTest { } else { null }?.apply { - events[OpenTraceEmitter.LifecycleEvent.RENDER] = this + events[UiLoadTraceEmitter.LifecycleEvent.RENDER] = this } val traceStartMs = if (previousState != PreviousState.FROM_BACKGROUND) { @@ -415,7 +415,7 @@ internal class OpenTraceEmitterTest { private enum class PreviousState { FROM_ACTIVITY, FROM_BACKGROUND, - FROM_INTERRUPTED_ACTIVITY_OPEN + FROM_INTERRUPTED_LOAD } companion object {