Skip to content
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

feat: add session sync callback #1292

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open

Conversation

kholood-ea
Copy link
Contributor

Description of the change

Add setSyncCallback feature that allows user to do dynamic sampling for sessions based on its metadata.

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

jiraID:MOB-15662

jiraID:MOB-15657

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

kholood-ea and others added 5 commits September 18, 2024 17:26
* feat(android): add SRSyncCallback

* feat: implement and test syncCallback CP side

* feat(example): use SRSyncCallback in example app

* ci: fix tests

* fix: export session data type

* fix(example): use session data type

* fix(android):remove data modifier

* fix(android): add property modifiers

* fix(android): update test case

* fix: enhance test case

* fix: update session data type

* fix: add more session metadata to setSyncCallback

* fix: update syncCallback test

* feat: add launchType to session metadata for setSyncCallback

* fix: import type

* fix: assert evaluate sync returns correct value

* fix: import type

* fix: cleanup

* chore: update js doc

* fix: typo

* fix: follow interface naming convention

* fix: update type

* fix: refactor syncCallback

* fix: default syncing session to true

* fix: convert network logs to readable array

* chore: add discriptive comment

* chore: use readable map for session metadata

* fix: setSyncCallback should sync in case of exception

* fix: move SessionMetadata to models

* fix: update SessionMetadata type import

* fix: report bug e2e test

---------

Co-authored-by: Ahmed Elrefaey <[email protected]>
* feat(android): add SRSyncCallback

* feat: implement and test syncCallback CP side

* feat(example): use SRSyncCallback in example app

* ci: fix tests

* fix: export session data type

* fix(example): use session data type

* fix(android):remove data modifier

* fix(android): add property modifiers

* fix(android): update test case

* fix: enhance test case

* fix(ios): update network log signature

* chore(ios): integrate dynamic sampling snapshot

* fix:update IOS network log unit test

* fix: update session metadata

* feat(ios): add setSyncCallback

* fix: pod.lock file

* fix: update session data type

* fix: add more session metadata to setSyncCallback

* fix: update syncCallback test

* feat: add launchType to session metadata for setSyncCallback

* fix: import type

* fix: enhance test case

* fix: add more session metadata to setSyncCallback

* fix: update syncCallback test

* feat: add launchType to session metadata for setSyncCallback

* fix: import type

* feat(ios): add launchType metadata to session syncCallback

* fix: add unknown type to launch types

* fix: assert evaluate sync returns correct value

* fix: import type

* fix: cleanup

* chore: update js doc

* fix: typo

* fix: follow interface naming convention

* fix: update type

* fix: refactor syncCallback

* fix: default syncing session to true

* fix: convert network logs to readable array

* chore: add discriptive comment

* chore: use readable map for session metadata

* fix: setSyncCallback should sync in case of exception

* fix: move SessionMetadata to models

* fix: update SessionMetadata type import

* fix: report bug e2e test

* chore (ios): update snapshot

* chore (ios): refactor callback

* fix: return network logs

* chore: update podfile.lock

* chore: fix formatting

* chore: revert Podfile.lock

* chore: fix ci

* fix: launchType typo

* fix: update class sessionEvaluationCompletion atomicity

* chore: enhance syncCallback formatting

* chore: update evaluateSync formatting

* fix: fix test SetSyncCallback

* fix: update getNetworkLogsArray return value

---------

Co-authored-by: Ahmed Elrefaey <[email protected]>
@kholood-ea kholood-ea self-assigned this Oct 2, 2024
Copy link
Contributor

@a7medev a7medev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good job @kholood-ea 👏🏼
I've added some small comments please check them out, I'd love to hear your thoughts.

src/models/SessionMetadata.ts Outdated Show resolved Hide resolved
src/utils/Enums.ts Outdated Show resolved Hide resolved
src/utils/Enums.ts Show resolved Hide resolved
src/utils/Enums.ts Show resolved Hide resolved
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