Skip to content

feat(setTelemetryOptOut): set to automatic when metrics request responds with 200#5064

Merged
nataliadelmar merged 7 commits into
webex:nextfrom
nataliadelmar:ndelmar/clientMetricsNetworkError202
Jul 7, 2026
Merged

feat(setTelemetryOptOut): set to automatic when metrics request responds with 200#5064
nataliadelmar merged 7 commits into
webex:nextfrom
nataliadelmar:ndelmar/clientMetricsNetworkError202

Conversation

@nataliadelmar

Copy link
Copy Markdown
Contributor

When the metric submission requests responds with 200, we realise that it means that the user's browser/firewall is blocking the metrics from being sent, so we need to setTelemetryOptOut as 'automatic', only if it has not been set to manual already (manual opt out wins over automatic opt out).

We also need to set it back to undefined if we stop getting 200s after having set it to automatic.

@nataliadelmar nataliadelmar requested review from a team as code owners July 1, 2026 15:27

@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: 6a51a78690

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@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: 4450b11468

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nataliadelmar nataliadelmar added the validated If the pull request is validated for automation. label Jul 2, 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: c6549b8434

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nataliadelmar nataliadelmar changed the title feat(ndelmar/clientMetricsNetworkError200): set telemetry opt out to automatic when 200 response feat(ndelmar/setTelemetryOptOut): set to automatic when metrics request responds with 200 Jul 2, 2026
@github-actions github-actions Bot removed the validated If the pull request is validated for automation. label Jul 2, 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: 51c4a28b58

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@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: 0b3a7ac48b

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

`CallDiagnosticEventsBatcher: @submitHttpRequest#${batchId}. Request successful.`
);

this.handleHttpResponseStatus(res?.statusCode, payload);

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 Bypass batch item handling for blocker 200s

When the browser/firewall returns the 200 blocker response, this sets telemetryOptOut but still returns res to the inherited Batcher.executeQueue() success path, which then calls handleHttpSuccess(res) and expects res.body.items to be an array. A blocker 200, including the {statusCode: 200} shape used by the new tests, has no metrics items, so submitClientEvent() rejects even though this response is now an expected opt-out signal; short-circuit or accept the marked payload for this case, and mirror the fix in the prelogin batcher.

Useful? React with 👍 / 👎.

@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: 837bfc5e72

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

`error: ${generateCommonErrorMetadata(err)}`
);

this.handleHttpResponseStatus(err?.statusCode, payload);

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 Don't clear automatic opt-out on retryable network errors

When a marked batch fails with a retryable NetworkOrCORSError/statusCode 0 or no status, this call feeds that value into handleHttpResponseStatus; if telemetryOptOut is currently automatic, the helper clears it before the inherited metrics batcher re-enqueues the same payload for retry. A transient offline/CORS failure therefore removes telemetryOptOut: 'automatic' from later client events even though no non-200 HTTP response proved that the blocker condition recovered; skip this status handling for network errors, and apply the same guard in the prelogin batcher.

Useful? React with 👍 / 👎.

@nataliadelmar nataliadelmar added the validated If the pull request is validated for automation. label Jul 7, 2026
@nataliadelmar nataliadelmar changed the title feat(ndelmar/setTelemetryOptOut): set to automatic when metrics request responds with 200 feat(setTelemetryOptOut): set to automatic when metrics request responds with 200 Jul 7, 2026
@nataliadelmar nataliadelmar merged commit 7640973 into webex:next Jul 7, 2026
10 checks passed
@github-actions

github-actions Bot commented Jul 7, 2026

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

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