Skip to content
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 Compose widgets are not being correctly identified #3209

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

markushi
Copy link
Member

📜 Description

Using the latest version of Compose, the compiler plugin sometimes does not fold SentryTraced into the same UI Node element anymore. This causes our SentryTag semantic to be inside the parent node, but the Clickable semantic ends up in the child node.

💡 Motivation and Context

Fixes #3208

💚 How did you test it?

I was able to reproduce the issue locally, did some manual tests.

We definitely need to get better at automating this, right now it's super painful as newer versions of Compose require a newer versions of Kotlin. This in turn requires bumping some plugins (e.g. detekt), which then in turn emit new build time errors.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 401.66 ms 456.92 ms 55.26 ms
Size 1.70 MiB 2.27 MiB 584.74 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
93a76ca 377.96 ms 447.52 ms 69.56 ms
baaf637 462.32 ms 579.22 ms 116.90 ms
2465853 411.39 ms 461.10 ms 49.72 ms
c3f503e 360.41 ms 434.67 ms 74.27 ms
93a76ca 381.08 ms 459.22 ms 78.14 ms
c7e2fbc 393.98 ms 478.24 ms 84.27 ms
2465853 422.61 ms 491.20 ms 68.58 ms
5e04ee8 302.68 ms 343.36 ms 40.68 ms
283d83e 416.81 ms 497.22 ms 80.41 ms
d6d2b2e 413.20 ms 486.76 ms 73.56 ms

App size

Revision Plain With Sentry Diff
93a76ca 1.72 MiB 2.29 MiB 576.75 KiB
baaf637 1.72 MiB 2.27 MiB 558.42 KiB
2465853 1.70 MiB 2.27 MiB 583.82 KiB
c3f503e 1.72 MiB 2.29 MiB 577.04 KiB
93a76ca 1.72 MiB 2.29 MiB 576.75 KiB
c7e2fbc 1.72 MiB 2.29 MiB 576.40 KiB
2465853 1.70 MiB 2.27 MiB 583.82 KiB
5e04ee8 1.70 MiB 2.27 MiB 584.64 KiB
283d83e 1.72 MiB 2.29 MiB 577.69 KiB
d6d2b2e 1.72 MiB 2.27 MiB 555.05 KiB

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the compiler plugin sometimes does not fold SentryTraced into the same UI Node

Do you mean our compiler plugin or the compose compiler plugin?

@markushi
Copy link
Member Author

markushi commented Feb 16, 2024

Do you mean our compiler plugin or the compose compiler plugin?

Ah sorry, I meant the Jetpack Compose Compiler plugin.

@romtsn
Copy link
Member

romtsn commented Feb 16, 2024

Do you mean our compiler plugin or the compose compiler plugin?

Ah sorry, I meant the Jetpack Compose Compiler plugin.

yeah, I will think of strategies, I still have it on my to-do. Could you post which versions of Compose and Kotlin are specifically causing this issue?

@markushi
Copy link
Member Author

Do you mean our compiler plugin or the compose compiler plugin?

Ah sorry, I meant the Jetpack Compose Compiler plugin.

yeah, I will think of strategies, I still have it on my to-do. Could you post which versions of Compose and Kotlin are specifically causing this issue?

val kotlinVersion = "1.9.22"
val composeVersion = "1.5.12"
val androidComposeCompilerVersion = "1.5.9"

@markushi markushi merged commit ceb541b into main Feb 16, 2024
24 checks passed
@markushi markushi deleted the fix/compose-interaction-tracing branch February 16, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kotlin Compiler Plugin does not tag @Composable functions
2 participants