BranchMetrics / android-branch-deep-linking-attribution

The Branch Android SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/pages/apps/android/
MIT License
395 stars 155 forks source link

Clean and format logging statements #1170

Closed gdeluna-branch closed 4 months ago

gdeluna-branch commented 4 months ago

Reference

SDK-XXX -- .</p> <h2>Description</h2> <ul> <li>To help diagnose network errors, some additional logging has been added to the custom networking stack.</li> <li><code>JSONExceptions</code> are moved to <code>WARN</code></li> <li>Unset duplicate retry bool, networking stack already takes care of this.</li> <li>Critical errors are sent to <code>ERROR</code></li> <li>Removal of <code>printstacktrace()</code> as that ignores our logging convention.</li> </ul> <h2>Testing Instructions</h2> <p>Intentionally fail requests </p> <ul> <li>With malformed branch key. You should see a 400 error in the log formatted with no retry.</li> <li>With no internet connection. You should see no valid response code, with 3 (or configured) retries.</li> </ul> <h2>Risk Assessment [<code>LOW</code>]</h2> <!-- CHOOSE ONE OF THE THREE ASSESSMENTS ABOVE --> <!-- FOR MEDIUM OR HIGH ASSESSMENTS, ADD ADDITIONAL NOTES HERE --> <ul> <li>[✅] I, the PR creator, have tested — integration, unit, or otherwise — this code.</li> </ul> <h2>Reviewer Checklist (To be checked off by the reviewer only)</h2> <ul> <li>[ ] JIRA Ticket is referenced in PR title.</li> <li>Correctness & Style <ul> <li>[ ] Conforms to <a rel="noreferrer nofollow" target="_blank" href="https://source.android.com/setup/contribute/code-style">AOSP Style Guides</a></li> <li>[ ] Mission critical pieces are documented in code and out of code as needed.</li> </ul></li> <li>[ ] Unit Tests reviewed and test issue sufficiently.</li> <li>[ ] Functionality was reviewed in QA independently by another engineer on the team.</li> </ul> <p>cc @BranchMetrics/saas-sdk-devs for visibility.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/codecov[bot]"><img src="https://avatars.githubusercontent.com/in/254?v=4" />codecov[bot]</a> commented <strong> 4 months ago</strong> </div> <div class="markdown-body"> <h2><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">Codecov</a> Report</h2> <p>Attention: Patch coverage is <code>4.16667%</code> with <code>138 lines</code> in your changes are missing coverage. Please review.</p> <blockquote> <p>Project coverage is 38.18%. Comparing base <a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/commit/9e4a699ddc8efc78cef7c952e1a5df05cd7e33c6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">(<code>9e4a699</code>)</a> to head <a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">(<code>986bbe9</code>)</a>.</p> </blockquote> <table> <thead> <tr> <th><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">Files</a></th> <th>Patch %</th> <th>Lines</th> </tr> </thead> <tbody> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9uZXR3b3JrL0JyYW5jaFJlbW90ZUludGVyZmFjZVVybENvbm5lY3Rpb24uamF2YQ==">...al/network/BranchRemoteInterfaceUrlConnection.java</a></td> <td>7.81%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">59 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9TZXJ2ZXJSZXF1ZXN0LmphdmE=">...rc/main/java/io/branch/referral/ServerRequest.java</a></td> <td>6.25%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">15 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9TZXJ2ZXJSZXF1ZXN0UXVldWUuamF2YQ==">...in/java/io/branch/referral/ServerRequestQueue.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">13 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9TeXN0ZW1PYnNlcnZlci5qYXZh">...c/main/java/io/branch/referral/SystemObserver.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">12 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9TZXJ2ZXJSZXF1ZXN0SW5pdFNlc3Npb24uamF2YQ==">...a/io/branch/referral/ServerRequestInitSession.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">8 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9TZXJ2ZXJSZXF1ZXN0UmVnaXN0ZXJJbnN0YWxsLmphdmE=">.../branch/referral/ServerRequestRegisterInstall.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">5 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9TZXJ2ZXJSZXF1ZXN0Q3JlYXRlVXJsLmphdmE=">...ava/io/branch/referral/ServerRequestCreateUrl.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">4 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9TZXJ2ZXJSZXF1ZXN0UmVnaXN0ZXJPcGVuLmphdmE=">.../io/branch/referral/ServerRequestRegisterOpen.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">4 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9uZXR3b3JrL0JyYW5jaFJlbW90ZUludGVyZmFjZS5qYXZh">...branch/referral/network/BranchRemoteInterface.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">4 Missing :warning: </a></td> </tr> <tr> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics#diff-QnJhbmNoLVNESy9zcmMvbWFpbi9qYXZhL2lvL2JyYW5jaC9yZWZlcnJhbC9BcHBTdG9yZVJlZmVycmVyLmphdmE=">...main/java/io/branch/referral/AppStoreReferrer.java</a></td> <td>0.00%</td> <td><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">2 Missing :warning: </a></td> </tr> <tr> <td>... and <a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">9 more</a></td> <td></td> </tr> </tbody> </table> <details><summary>Additional details and impacted files</summary> ```diff @@ Coverage Diff @@ ## master #1170 +/- ## ============================================ - Coverage 38.26% 38.18% -0.08% - Complexity 685 686 +1 ============================================ Files 59 59 Lines 6220 6248 +28 Branches 933 933 ============================================ + Hits 2380 2386 +6 - Misses 3394 3416 +22 Partials 446 446 ``` </details> <p><a href="https://app.codecov.io/gh/BranchMetrics/android-branch-deep-linking-attribution/pull/1170?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">:umbrella: View full report in Codecov by Sentry</a>.<br /> :loudspeaker: Have feedback on the report? <a href="https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BranchMetrics">Share it here</a>.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>