Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import io.sentry.SentryLevel.INFO
import io.sentry.SpanStatus
import io.sentry.TransactionContext
import io.sentry.TransactionOptions
import io.sentry.TypeCheckHint
import io.sentry.compose.navigation3.BackStackConverter.RetentionPolicy
import io.sentry.compose.navigation3.PreparedChange.BackStackHasNewTop
import io.sentry.compose.navigation3.PreparedChange.BackStackHasSameTop
Expand Down Expand Up @@ -199,11 +198,7 @@ internal class BackStackObserver<T : Any>(
}

if (options.enableNavigationBreadcrumbs) {
navBreadcrumbs.emit(
fromEntry = previousTop,
toEntry = currentBackStack.topEntryNormalized,
toRawEntry = currentBackStack.topEntry,
)
navBreadcrumbs.emit(fromEntry = previousTop, toEntry = currentBackStack.topEntryNormalized)
}

navTransaction.stop(scope)
Expand Down Expand Up @@ -454,11 +449,7 @@ private class NavScreen {
/** A helper class for generating nav breadcrumbs. */
private class NavBreadcrumbs(private val scopes: IScopes) {

fun <T : Any> emit(
fromEntry: NormalizedSentryBackStackEntry?,
toEntry: NormalizedSentryBackStackEntry,
toRawEntry: T,
) {
fun emit(fromEntry: NormalizedSentryBackStackEntry?, toEntry: NormalizedSentryBackStackEntry) {
val breadcrumb =
Breadcrumb().apply {
type = NAVIGATION_OP
Expand All @@ -480,7 +471,6 @@ private class NavBreadcrumbs(private val scopes: IScopes) {
}

val hint = Hint()
hint.set(TypeCheckHint.ANDROID_NAV3_DESTINATION, toRawEntry)
scopes.addBreadcrumb(breadcrumb, hint)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import io.sentry.SentryOptions
import io.sentry.SentryTracer
import io.sentry.TransactionContext
import io.sentry.TransactionOptions
import io.sentry.TypeCheckHint
import io.sentry.protocol.App
import io.sentry.protocol.TransactionNameSource
import org.junit.Test
Expand Down Expand Up @@ -153,8 +152,6 @@ class BackStackObserverTest {
"to_arguments",
mapOf("userId" to "123"),
)
assertThat(fixture.breadcrumbHints.last().get(TypeCheckHint.ANDROID_NAV3_DESTINATION))
.isSameInstanceAs(profile)
}

@Test
Expand Down Expand Up @@ -320,8 +317,6 @@ class BackStackObserverTest {
assertThat(fixture.breadcrumbs).hasSize(2)
assertThat(fixture.breadcrumbs.last().data["from"]).isEqualTo("/ProfileScreen")
assertThat(fixture.breadcrumbs.last().data["to"]).isEqualTo("/ProfileScreen")
assertThat(fixture.breadcrumbHints.last().get(TypeCheckHint.ANDROID_NAV3_DESTINATION))
.isSameInstanceAs(replacementProfile)
assertThat(fixture.startedTransactions).hasSize(2)
assertThat(fixture.startedTransactions.last().name).isEqualTo("/ProfileScreen")
assertThat(fixture.startedTransactions.first().isFinished).isTrue()
Expand Down
1 change: 0 additions & 1 deletion sentry/api/sentry.api
Original file line number Diff line number Diff line change
Expand Up @@ -4824,7 +4824,6 @@ public final class io/sentry/TypeCheckHint {
public static final field ANDROID_FRAGMENT Ljava/lang/String;
public static final field ANDROID_INTENT Ljava/lang/String;
public static final field ANDROID_MOTION_EVENT Ljava/lang/String;
public static final field ANDROID_NAV3_DESTINATION Ljava/lang/String;
public static final field ANDROID_NAV_DESTINATION Ljava/lang/String;
public static final field ANDROID_NETWORK_CAPABILITIES Ljava/lang/String;
public static final field ANDROID_SENSOR_EVENT Ljava/lang/String;
Expand Down
4 changes: 0 additions & 4 deletions sentry/src/main/java/io/sentry/TypeCheckHint.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ public final class TypeCheckHint {
/** Used for Navigation breadrcrumbs. */
public static final String ANDROID_NAV_DESTINATION = "android:navigationDestination";

/** Used for Navigation 3 breadcrumbs. */
@ApiStatus.Experimental @ApiStatus.Internal
public static final String ANDROID_NAV3_DESTINATION = "android:nav3Destination";

/** Used for Network breadrcrumbs. */
public static final String ANDROID_NETWORK_CAPABILITIES = "android:networkCapabilities";

Expand Down
Loading