Add support for Sentry Kotlin Compiler Plugin#2695
Conversation
Counterpart for Kotlin Compiler Plugin
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 46b1782 | 387.72 ms | 458.74 ms | 71.02 ms |
| 1707044 | 338.80 ms | 384.79 ms | 46.00 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 46b1782 | 1.72 MiB | 2.28 MiB | 570.44 KiB |
| 1707044 | 1.72 MiB | 2.28 MiB | 570.44 KiB |
Previous results on branch: feat/compose-compiler-plugin
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5ea803d | 326.18 ms | 359.36 ms | 33.18 ms |
| ffa0ad4 | 289.42 ms | 376.22 ms | 86.80 ms |
| ea7fcbe | 367.34 ms | 414.72 ms | 47.38 ms |
| 775fa63 | 298.58 ms | 388.15 ms | 89.56 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5ea803d | 1.72 MiB | 2.28 MiB | 570.71 KiB |
| ffa0ad4 | 1.72 MiB | 2.28 MiB | 565.75 KiB |
| ea7fcbe | 1.72 MiB | 2.26 MiB | 553.74 KiB |
| 775fa63 | 1.72 MiB | 2.26 MiB | 553.74 KiB |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2695 +/- ##
============================================
- Coverage 81.11% 81.09% -0.02%
Complexity 4447 4447
============================================
Files 345 345
Lines 16394 16399 +5
Branches 2226 2226
============================================
+ Hits 13298 13299 +1
- Misses 2168 2172 +4
Partials 928 928
☔ View full report in Codecov by Sentry. |
romtsn
left a comment
There was a problem hiding this comment.
Code-wise this looks good, but I have few rather conceptual things:
- When I tried integrating kotlin-compiler-plugin into the sample, I've faced a compilation error, because our sample uses Kotlin 1.8, and the compiler plugin seems to support only 1.8.20 onwards (after updating the kotlin version, it worked). The error was the same one as drewhamilton/Poko#122. The question is if we want to support lower version of Kotlin, or we just say we support the latest one onwards?
- I thought of moving
SentryModifierandSentryComposeTracingtocommonMainif possible, but I guess we could do it later when we start looking into compose-multiplatform support - Last thing - I've tried integrating the compiler plugin into our sample, but unfortunately I don't think it brings much value in the current state (unless I misunderstood how it all should work in the end). E.g. for our sample on the screenshot I've removed all of the custom
SentryTracedwrappers and just left the compiler plugin do its job and it only inferred one tag (Landing). I guess we should rethink our instrumentation a bit for the view hierarchy case 😅
|
I guess we'll still have to maintain the compat matrix for the future versions of Kotlin, but yeah let's start with 1.8.20 as the initial version |
|
|
||
| ### Features | ||
| - Add support for Sentry Kotlin Compiler Plugin ([#2695](https://github.com/getsentry/sentry-java/pull/2695)) | ||
| - In conjunction with our sentry-kotlin-compiler-plugin we improved Jetpack Compose support for |
There was a problem hiding this comment.
nit: Ideally here would be also a link to sentry-kotlin-compiler-plugin docs, but we can update it later ;)
There was a problem hiding this comment.
I'd really appreciate a link to the compiler plugin docs as I've been meaning to try these new features and haven't been able to understand how to use the compiler plugin.
There was a problem hiding this comment.
@tfcporciuncula they are in the making, but soon will be there :) getsentry/sentry-docs#7026

📜 Description
Counterpart for Kotlin Compiler Plugin
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps