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(calling): adding metrics for bnr #3161

Closed
wants to merge 7 commits into from

Conversation

Kesari3008
Copy link
Contributor

@Kesari3008 Kesari3008 commented Oct 25, 2023

COMPLETES #https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-466014

This pull request addresses

Adding metrics to be sent when BNR is enabled/disabled on the call.

by making the following changes

Invoking submitBNRMetric() under dial() API, answer() API and outputTrackUpdateListener that listens for following events:

streamTrack.on("effect:added"
effect.on("enabled"
effect.on("disabled"

Based on the reception of above events track is updated if needed and BNR metrics are sent when the effect is enabled/disabled.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios where tested

Testcase 1: Enabled BNR and dialed an outbound call. BNR_ENABLED metrics are being sent once dial API is invoked. Disabled the BNR while on the call and BNR_DISABLED metrics are being sent for the same.

Testcase 2: Enabled BNR, triggered an inbound call and answered it. BNR_ENABLED metrics are being sent once answer API is invoked. Disabled the BNR while on the call and BNR_DISABLED metrics are being sent for the same.

Testcase 3: On an ongoing call, enabled and disabled BNR and metrics are sent for each occurrence.

Network logs are attached in the JIRA for each scenario mentioned above.

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

@Kesari3008 Kesari3008 added the validated If the pull request is validated for automation. label Oct 25, 2023
@aws-amplify-us-east-2
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3161.d3m3l2kee0btzx.amplifyapp.com

@Kesari3008 Kesari3008 marked this pull request as ready for review October 31, 2023 10:00
@Kesari3008 Kesari3008 requested a review from a team as a code owner October 31, 2023 10:00
Copy link
Contributor

@sreenara sreenara left a comment

Choose a reason for hiding this comment

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

Please add all test cases to the PR description section on tests

packages/calling/src/CallingClient/calling/call.ts Outdated Show resolved Hide resolved
packages/calling/src/CallingClient/calling/call.ts Outdated Show resolved Hide resolved
packages/calling/src/CallingClient/calling/call.ts Outdated Show resolved Hide resolved
packages/calling/src/CallingClient/calling/call.ts Outdated Show resolved Hide resolved
packages/calling/src/CallingClient/calling/call.test.ts Outdated Show resolved Hide resolved
packages/calling/src/CallingClient/calling/call.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@sreenara sreenara left a comment

Choose a reason for hiding this comment

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

Some questions:

  1. Have we thought about how we'd track errors in enabling BNR?
  2. Do we want to track failures in enabling BNR? How will that help us?
  3. What would the approach be to get this information in metrics?

Please add UT for the new code

@@ -321,6 +321,43 @@ class MetricManager implements IMetricManager {
this.webex.internal.metrics.submitClientMetrics(name, data);
}
}

public submitBNRMetric(
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see UT changes for this function?

@Kesari3008 Kesari3008 requested a review from a team as a code owner January 29, 2024 07:20
@Kesari3008 Kesari3008 force-pushed the SPARK-466014-BNR-Metrics branch from f0cc488 to af3ee4f Compare January 29, 2024 10:07
@Kesari3008 Kesari3008 closed this Jan 29, 2024
@Kesari3008
Copy link
Contributor Author

Raised separate PR as this one was having merge conflicts due to beta to next merge

@Kesari3008 Kesari3008 deleted the SPARK-466014-BNR-Metrics branch January 29, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated If the pull request is validated for automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants