-
-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tags missing for compose view hierarchies #4275
Conversation
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
eb39954 | 436.12 ms | 493.80 ms | 57.68 ms |
f63778b | 413.88 ms | 482.02 ms | 68.14 ms |
6f1848f | 384.70 ms | 441.52 ms | 56.82 ms |
ec2f9cd | 390.96 ms | 418.91 ms | 27.95 ms |
261e725 | 389.22 ms | 417.14 ms | 27.92 ms |
b159a6d | 378.41 ms | 464.32 ms | 85.91 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
eb39954 | 1.58 MiB | 2.22 MiB | 652.89 KiB |
f63778b | 1.58 MiB | 2.22 MiB | 652.84 KiB |
6f1848f | 1.58 MiB | 2.22 MiB | 652.90 KiB |
ec2f9cd | 1.58 MiB | 2.22 MiB | 655.17 KiB |
261e725 | 1.58 MiB | 2.22 MiB | 655.17 KiB |
b159a6d | 1.58 MiB | 2.22 MiB | 653.07 KiB |
...-compose-helper/src/jvmMain/java/io/sentry/compose/gestures/ComposeGestureTargetLocator.java
Outdated
Show resolved
Hide resolved
...-compose-helper/src/jvmMain/java/io/sentry/compose/gestures/ComposeGestureTargetLocator.java
Outdated
Show resolved
Hide resolved
@@ -99,6 +105,21 @@ private static void setTag( | |||
} | |||
} | |||
} | |||
} else if ("androidx.compose.ui.platform.TestTagElement".equals(type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to test it with robolectric/instrumented tests to avoid regressions in future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have tests for this (and extract that logic into a separate class if possible), but LGTM otherwise!
….com:getsentry/sentry-java into markushi/fix/compose-view-hierarchy-exporter
sentry-compose-helper/src/jvmMain/java/io/sentry/compose/SentryComposeHelper.java
Outdated
Show resolved
Hide resolved
return value as String? | ||
} | ||
} catch (e: Throwable) { | ||
// ignored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe worth to add a debug log here so we can troubleshoot easier?
sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryComposeHelper.kt
Outdated
Show resolved
Hide resolved
...c/androidUnitTest/kotlin/io/sentry/compose/viewhierarchy/ComposeViewHierarchyExporterTest.kt
Outdated
Show resolved
Hide resolved
...mpose/src/androidMain/kotlin/io/sentry/compose/viewhierarchy/ComposeViewHierarchyExporter.kt
Outdated
Show resolved
Hide resolved
...mpose/src/androidMain/kotlin/io/sentry/compose/viewhierarchy/ComposeViewHierarchyExporter.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM again, but these two comments I guess would be nice to address: https://github.com/getsentry/sentry-java/pull/4275/files#r2014326540
Great tests btw, and very happy to get rid of that workaround with the java-only module
📜 Description
Only on newer versions of Jetpack Compose
💡 Motivation and Context
Fixes #4273
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps