Skip to content

fix(internal-plugin-metrics): log call diagnostic milestones#5045

Merged
maxinteger merged 2 commits into
webex:nextfrom
maxinteger:fix/add-call-diagnostic-milestone
Jul 9, 2026
Merged

fix(internal-plugin-metrics): log call diagnostic milestones#5045
maxinteger merged 2 commits into
webex:nextfrom
maxinteger:fix/add-call-diagnostic-milestone

Conversation

@maxinteger

@maxinteger maxinteger commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

COMPLETES SPARK-827015

This pull request addresses

Without well-known marks (milestones) hard to analyse client logs.

by making the following changes

This PR uses the call diagnostic events' name as milestones.
It can be extended later if needed.

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

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

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

Make sure to have followed the contributing guidelines before submitting.

@maxinteger maxinteger requested review from a team as code owners June 24, 2026 12:13
@maxinteger maxinteger added the validated If the pull request is validated for automation. label Jun 24, 2026
@maxinteger maxinteger changed the title fix(internal-plugin-metrics): log call diagsnotc milestons fix(internal-plugin-metrics): log call diagnostic milestones Jun 24, 2026

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

Copy link
Copy Markdown

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: 04e7fa4902

ℹ️ 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".

Comment on lines +470 to +472
assert.isTrue(
logSpy.calledWith('Milestone,CallDiagnostic', eventName),
'expected logger.log to be called with Milestone,CallDiagnostic and the event name'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Fix mismatched milestone log assertion

The implementation added above calls logger.log() with one formatted string (Milestone,CallDiagnostic: ${eventName}), but this assertion expects two separate arguments. In the internal-plugin-metrics unit suite this test is therefore always false even when the milestone log is emitted, so CI will fail until the assertion matches the actual call shape or the production log call is changed to pass two arguments.

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-5045.d3m3l2kee0btzx.amplifyapp.com

@maxinteger maxinteger force-pushed the fix/add-call-diagnostic-milestone branch from 04e7fa4 to 6218b3b Compare June 30, 2026 10:25
@github-actions github-actions Bot removed the validated If the pull request is validated for automation. label Jun 30, 2026
@maxinteger maxinteger force-pushed the fix/add-call-diagnostic-milestone branch from 6218b3b to 576d47f Compare July 1, 2026 10:34
@maxinteger maxinteger enabled auto-merge (squash) July 1, 2026 12:49
@maxinteger maxinteger added the validated If the pull request is validated for automation. label Jul 1, 2026
@maxinteger maxinteger closed this Jul 2, 2026
auto-merge was automatically disabled July 2, 2026 10:13

Pull request was closed

@maxinteger maxinteger reopened this Jul 2, 2026
@maxinteger maxinteger force-pushed the fix/add-call-diagnostic-milestone branch from 576d47f to 3dec4d7 Compare July 3, 2026 10:06
@github-actions github-actions Bot removed the validated If the pull request is validated for automation. label Jul 3, 2026

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

Copy link
Copy Markdown

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: 3dec4d72a6

ℹ️ 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".

Comment on lines +394 to +395
if (eventName) {
webex.logger.log('Milestone,CallDiagnostic', eventName);

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 Log milestones once per metric

When a call-diagnostic metrics POST hits a transient NetworkOrCORSError, the default metrics batcher retries by calling rerequest(), which invokes this batcher's prepareItem() again before re-enqueueing the same item. Because the milestone log is emitted inside prepareDiagnosticMetricItem(), a single client event can produce repeated Milestone,CallDiagnostic entries on each retry, seconds apart, making the client-log milestone timeline misleading; guard this per item or move the mark to the point where the event is originally created.

Useful? React with 👍 / 👎.

@maxinteger maxinteger force-pushed the fix/add-call-diagnostic-milestone branch 4 times, most recently from 2f7cc97 to d11bd48 Compare July 9, 2026 08:53
@maxinteger maxinteger added the validated If the pull request is validated for automation. label Jul 9, 2026
@maxinteger maxinteger force-pushed the fix/add-call-diagnostic-milestone branch from d11bd48 to 4983b4f Compare July 9, 2026 13:31
@github-actions github-actions Bot removed the validated If the pull request is validated for automation. label Jul 9, 2026
@maxinteger maxinteger added the validated If the pull request is validated for automation. label Jul 9, 2026
@maxinteger maxinteger merged commit 12a952f into webex:next Jul 9, 2026
10 checks passed
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
🎉 Your changes are now available!
Released in: v3.12.0-next.135
📖 View full changelog →
Packages Updated Version
webex 3.12.0-next.135
@webex/calling 3.12.0-next.69
@webex/contact-center 3.12.0-next.79
@webex/internal-plugin-ai-assistant 3.12.0-next.30
@webex/internal-plugin-avatar 3.12.0-next.30
@webex/internal-plugin-board 3.12.0-next.31
@webex/internal-plugin-calendar 3.12.0-next.31
@webex/internal-plugin-call-ai-summary 3.12.0-next.30
@webex/internal-plugin-conversation 3.12.0-next.31
@webex/internal-plugin-device 3.12.0-next.29
@webex/internal-plugin-dss 3.12.0-next.30
@webex/internal-plugin-ediscovery 3.12.0-next.31
@webex/internal-plugin-encryption 3.12.0-next.30
@webex/internal-plugin-feature 3.12.0-next.29
@webex/internal-plugin-flag 3.12.0-next.31
@webex/internal-plugin-llm 3.12.0-next.33
@webex/internal-plugin-locus 3.12.0-next.30
@webex/internal-plugin-lyra 3.12.0-next.31
@webex/internal-plugin-mercury 3.12.0-next.30
@webex/internal-plugin-metrics 3.12.0-next.29
@webex/internal-plugin-presence 3.12.0-next.30
@webex/internal-plugin-scheduler 3.12.0-next.30
@webex/internal-plugin-search 3.12.0-next.31
@webex/internal-plugin-support 3.12.0-next.31
@webex/internal-plugin-task 3.12.0-next.31
@webex/internal-plugin-team 3.12.0-next.31
@webex/internal-plugin-user 3.12.0-next.30
@webex/internal-plugin-voicea 3.12.0-next.33
@webex/internal-plugin-wdm 3.12.0-next.29
@webex/plugin-attachment-actions 3.12.0-next.31
@webex/plugin-authorization 3.12.0-next.29
@webex/plugin-authorization-browser 3.12.0-next.29
@webex/plugin-authorization-browser-first-party 3.12.0-next.29
@webex/plugin-authorization-node 3.12.0-next.29
@webex/plugin-device-manager 3.12.0-next.31
@webex/plugin-encryption 3.12.0-next.30
@webex/plugin-logger 3.12.0-next.29
@webex/plugin-meetings 3.12.0-next.91
@webex/plugin-memberships 3.12.0-next.31
@webex/plugin-messages 3.12.0-next.31
@webex/plugin-people 3.12.0-next.30
@webex/plugin-presence 0.0.0-next.204
@webex/plugin-rooms 3.12.0-next.31
@webex/plugin-team-memberships 3.12.0-next.29
@webex/plugin-teams 3.12.0-next.29
@webex/plugin-webhooks 3.12.0-next.29
@webex/recipe-private-web-client 3.12.0-next.31
@webex/storage-adapter-local-forage 3.12.0-next.29
@webex/storage-adapter-local-storage 3.12.0-next.29
@webex/storage-adapter-session-storage 3.12.0-next.29
@webex/test-webex-node 0.0.1-next.2
@webex/webex-core 3.12.0-next.29
@webex/webex-server 3.12.0-next.31
webex-node 3.12.0-next.34

Thank you for your contribution!
🤖 This is an automated message. For queries, please contact support.

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.

3 participants