Skip to content

feat(plugin-meetings): include isMultistream and isInLobby in media i…#5000

Open
k-wasniowski wants to merge 1 commit into
webex:nextfrom
k-wasniowski:extend-audio-issue-metadata-metrics
Open

feat(plugin-meetings): include isMultistream and isInLobby in media i…#5000
k-wasniowski wants to merge 1 commit into
webex:nextfrom
k-wasniowski:extend-audio-issue-metadata-metrics

Conversation

@k-wasniowski
Copy link
Copy Markdown
Contributor

This pull request addresses

The js_sdk_media_issue_detected behavioral metric only carried correlationId plus per-issue counts. When triaging inbound audio issues we couldn't tell from the metric alone whether the affected client was in a multistream meeting or whether it was still sitting in the lobby — both of which significantly change the expected media behavior and the set of plausible root causes.

by making the following changes

  • Refactored MediaProperties.sendMediaIssueMetric to take a single metadata object instead of a positional correlationId, so future static-per-meeting context can be added without further signature churn.
  • Extended the metadata with isMultistream and isInLobby (sourced from meeting.isMultistream and !!meeting.isUserUnadmitted respectively).
  • Updated the only call site in meeting/index.ts (inbound audio issue handler) to pass the new metadata object.
  • Updated unit tests in media/properties.ts and meeting/index.js to cover the new payload shape and tightened a couple of assertions to calledOnceWithExactly.

No behavioral change beyond additional fields in the emitted metric; throttling, counter accumulation, and reset semantics are unchanged.

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 were tested

  • Ran yarn workspace @webex/plugin-meetings test:unit --targets media/properties.ts — all 30 tests pass, including the four sendMediaIssueMetric cases that now assert isMultistream and isInLobby in the emitted payload.
  • Ran the relevant meeting/index.js unit tests covering the inbound audio issue handler to confirm the new metadata is forwarded with correlationId, isMultistream, and isInLobby.

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

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

@k-wasniowski k-wasniowski requested review from a team as code owners May 22, 2026 06:38
@k-wasniowski k-wasniowski added the validated If the pull request is validated for automation. label May 22, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be0e85cd50

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

this.mediaProperties.sendMediaIssueMetric('inbound_audio', data.issueSubType, {
correlationId: this.correlationId,
isMultistream: this.isMultistream,
isInLobby: !!this.isUserUnadmitted,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Separate counters by lobby state before throttled send

sendMediaIssueMetric is throttled for 5 minutes, but this call now includes isInLobby from live meeting state; if a user is admitted during that window, multiple inbound-audio issues are accumulated into one counter while the emitted payload carries only the latest isInLobby value. That mislabels part of the aggregated count (lobby vs admitted) and can skew triage dashboards. This is reachable because lobby state transitions are expected (SelfUtils.hasUserBeenAdmitted / isLocusUserUnadmitted).

Useful? React with 👍 / 👎.

@aws-amplify-us-east-2
Copy link
Copy Markdown

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

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

@k-wasniowski k-wasniowski force-pushed the extend-audio-issue-metadata-metrics branch from be0e85c to a48f50c Compare May 25, 2026 11:38
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.

1 participant