Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: support switching to native network interception #1120

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

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

a7medev
Copy link
Contributor

@a7medev a7medev commented Feb 4, 2024

Description of the change

Add a new Instabug.init config property (networkInterceptionMode) which allows switching between JavaScript and native network interception through JavaScript.

When the network interception mode is JavaScript, the SDK functions as it used to:

  1. Network interception is done through JavaScript.
  2. You can set an obfuscation handler and request filtering in the JavaScript code.
  3. Network requests sent through native code don't get captured.

Native network interception provides the following:

  1. Network interception is done through the native SDKs (the native iOS SDK works out of the box and the Android SDK requires configuring the Instabug APM network plugin.
  2. You can't set an obfuscation handler and request filtering in the JavaScript code, but you'd rather need to set it up in the native iOS and Android code through native APIs.
  3. JavaScript network requests should get captured by the native network interceptors without extra effort, so this mode should have a wider coverage of network logs than the JavaScript network interception mode.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Jira ID: MOB-13771

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests

Code review

  • This pull request has a descriptive title and information useful to a reviewer
  • Issue from task tracker has a link to this pull request

@mnoseir
Copy link

mnoseir commented Feb 4, 2024

Warnings
⚠️

You have not included a CHANGELOG entry!
You can find it at CHANGELOG.md.

Coverage Report

Label Coverage Status
JavaScript 96.2%
Android 49.2%
iOS 41.3%

Generated by 🚫 dangerJS against 8f5f38f

@a7medev a7medev merged commit 35013f6 into dev Feb 6, 2024
@a7medev a7medev deleted the feat/toggle-network-interceptors branch February 6, 2024 12:49
ahmedAlaaInstabug added a commit that referenced this pull request Feb 18, 2024
* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
ahmedAlaaInstabug added a commit that referenced this pull request Feb 19, 2024
* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* feat: add more crash scenarios to example app (#1131)

* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>

* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* fix:lint issue

* fix:  CHANGELOG typo issue

Co-authored-by: Abdelhamid Nasser <[email protected]>

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
ahmedAlaaInstabug added a commit that referenced this pull request Feb 20, 2024
* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
ahmedAlaaInstabug added a commit that referenced this pull request Feb 20, 2024
* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* feat: add more crash scenarios to example app (#1131)

* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>

* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* fix:lint issue

* fix:  CHANGELOG typo issue

Co-authored-by: Abdelhamid Nasser <[email protected]>

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
abdelhamid-f-nasser added a commit that referenced this pull request Feb 27, 2024
* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
abdelhamid-f-nasser added a commit that referenced this pull request Feb 28, 2024
* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
abdelhamid-f-nasser added a commit that referenced this pull request Feb 28, 2024
* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
abdelhamid-f-nasser added a commit that referenced this pull request Feb 28, 2024
* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* feat: add more crash scenarios to example app (#1131)

* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>

* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* fix:lint issue

* fix:  CHANGELOG typo issue

Co-authored-by: Abdelhamid Nasser <[email protected]>

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
abdelhamid-f-nasser added a commit that referenced this pull request Feb 28, 2024
* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
abdelhamid-f-nasser added a commit that referenced this pull request Feb 28, 2024
* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* feat: add more crash scenarios to example app (#1131)

* feat(example): add nested complex views (#1111)

Jira ID: MOB-13737

* fix hybrid mode code push version init (#1108)

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* ci: migrate macos machines to m1 (#1114)

* feat: support identify user by id (#1115)

Jira ID: MOB-13746

* ci: replace  d11 cluster url in UploadSourcemaps (#1122)

* fix(android): resolve private views through UI manager directly (#1121)

* feat: support switching to native network interception (#1120)

* feat(example): Add more sdk crashes buttons

* chore(android): ignore jetbrains ide run configurations (#1110)

Jira ID: MOB-13736

* feat(example): Add more sdk crashes buttons

* fix dev merge issue

* feat_add_crash_buttons

* feat_add_crash_buttons

* feat_add_crash_buttons

* fix: PlatformListTile typo  name

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>

* feat_add_setNDKCrashesEnabled

* fix android_testing issue

* rename_test_cases

* fix_pr_comments

* feat/add-ndk-demo-crash-buttons

* chore: add ChangeLog changes

* Update CHANGELOG.md

Co-authored-by: Abdelhamid Nasser <[email protected]>

* fix:lint issue

* fix:  CHANGELOG typo issue

Co-authored-by: Abdelhamid Nasser <[email protected]>

---------

Co-authored-by: Abdelhamid Nasser <[email protected]>
Co-authored-by: Ahmed Mahmoud <[email protected]>
Co-authored-by: AbdElHamid Nasser <[email protected]>
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.

4 participants