-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow all activities to ge traced by default #1789
Conversation
48d930d
to
7bbd8fe
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1789 +/- ##
==========================================
- Coverage 85.47% 85.46% -0.01%
==========================================
Files 466 466
Lines 10944 10948 +4
Branches 1626 1626
==========================================
+ Hits 9354 9357 +3
Misses 861 861
- Partials 729 730 +1
|
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
...va/io/embrace/android/embracesdk/internal/config/behavior/AutoDataCaptureBehaviorImplTest.kt
Show resolved
Hide resolved
return javaClass.isAnnotationPresent(TracedActivity::class.java) || | ||
autoTraceEnabled && !javaClass.isAnnotationPresent(NotTracedActivity::class.java) |
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.
Does this work with R8 or are additional rules required?
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.
This should work given that it's how we check @StartupActivity
, but I'll double check.
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.
Nice catch. Looks like this is an issue - which means @startupactivity detection didn't work either at runtime either.
...main/kotlin/io/embrace/android/embracesdk/internal/injection/DataCaptureServiceModuleImpl.kt
Show resolved
Hide resolved
6841bf2
to
5c4591e
Compare
7bbd8fe
to
5065414
Compare
5065414
to
cd6536e
Compare
5c4591e
to
357553b
Compare
cd6536e
to
42f2e2b
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files |
@@ -1,4 +1,4 @@ | |||
-keepattributes LineNumberTable, SourceFile | |||
-keepattributes LineNumberTable, SourceFile, RuntimeVisibleAnnotations |
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.
This will minimally make annotations work if it's not specified in another proguard file. We should probably just add all annotations, but we can do that in a different PR.
Goal
Add in annotations that allow a local config to specify that all activities loads are traced, with an opt-out annotation for those that shouldn't be.
Note: a change to the swazzler is needed to properly wire this up, but the SDK changes are all contained and tested in this PR.