Skip to content

Add Timber and Fragment integrations if they are present on the classpath#1936

Merged
romtsn merged 22 commits intomainfrom
feat/timber-and-fragment-auto-install
Mar 15, 2022
Merged

Add Timber and Fragment integrations if they are present on the classpath#1936
romtsn merged 22 commits intomainfrom
feat/timber-and-fragment-auto-install

Conversation

@romtsn
Copy link
Member

@romtsn romtsn commented Mar 4, 2022

📜 Description

  • Checks if sentry-android-timber and sentry-android-fragment are on the classpath and adds the integrations automatically.
  • Uses default ctors of those. Note, that for fragment we switched the flag to enable performance by default.

💡 Motivation and Context

Q1 goal

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@romtsn romtsn changed the title Add Timber and Fragment integrations if they are present on the class… Add Timber and Fragment integrations if they are present on the classpath Mar 6, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2022

Codecov Report

Merging #1936 (f7f84f4) into main (db05017) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #1936   +/-   ##
=========================================
  Coverage     75.60%   75.60%           
  Complexity     2270     2270           
=========================================
  Files           225      225           
  Lines          8072     8072           
  Branches        852      852           
=========================================
  Hits           6103     6103           
  Misses         1558     1558           
  Partials        411      411           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db05017...f7f84f4. Read the comment docs.

@audkar
Copy link
Contributor

audkar commented Mar 7, 2022

static final String SENTRY_FRAGMENT_INTEGRATION_CLASS_NAME =
      "io.sentry.android.fragment.FragmentLifecycleIntegration";

  static final String SENTRY_TIMBER_INTEGRATION_CLASS_NAME =
      "io.sentry.android.timber.SentryTimberIntegration";

Are these class names excluded from R8 obfuscation? Otherwise these might not be found in Android Release builds at runtime.

@romtsn
Copy link
Member Author

romtsn commented Mar 10, 2022

@marandaneto addressed everything, PTAL once again

@romtsn
Copy link
Member Author

romtsn commented Mar 10, 2022

static final String SENTRY_FRAGMENT_INTEGRATION_CLASS_NAME =
      "io.sentry.android.fragment.FragmentLifecycleIntegration";

  static final String SENTRY_TIMBER_INTEGRATION_CLASS_NAME =
      "io.sentry.android.timber.SentryTimberIntegration";

Are these class names excluded from R8 obfuscation? Otherwise these might not be found in Android Release builds at runtime.

@audkar thanks for raising the concern. Yes, we ship those modules with proguard rules that keep those classes, see here and here

…lass.java

Co-authored-by: Bruno Garcia <bruno@brunogarcia.com>
@romtsn romtsn merged commit 4bfe31b into main Mar 15, 2022
@romtsn romtsn deleted the feat/timber-and-fragment-auto-install branch March 15, 2022 21:11
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.

5 participants