fix(meetings): forward correlation ID for meeting info - #5181
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35c53fdefd
ℹ️ 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".
| }; | ||
|
|
||
| if (meetingId && sendCAevents && correlationId) { | ||
| requestOptions.headers = {correlationId}; |
There was a problem hiding this comment.
Preserve configured default headers when adding correlationId
When an SDK instance configures defaultRequestOptions.headers, setting a new headers object here prevents all of those configured headers from reaching this request: DefaultOptionsInterceptor.onRequest() only copies a default property when the top-level key is absent (packages/@webex/webex-core/src/interceptors/default-options.js, lines 46-49). Consequently, every meeting-info request with CA events and a correlation ID silently loses application-wide headers that were previously applied; merge the correlation ID with the configured/default headers instead of replacing the entire header set.
Useful? React with 👍 / 👎.
COMPLETES #TODO
This pull request addresses
Meeting-info Call Analyzer events carry a correlation ID, but the corresponding HTTP request does not forward that value as a
correlationIdheader. As a result, server-side meeting-info events cannot be associated with the same meeting attempt even when the request succeeds.Browser validation of the existing SDK behavior confirmed that a successful meeting-info request is sent without the
correlationIdheader.by making the following changes
MeetingtoMeetingInfoV2.fetchMeetingInfo().correlationIdHTTP header when the request is associated with a meeting, Call Analyzer events are enabled for that request, and a correlation ID is available.Meetingunit expectations for fetch and refresh meeting-info calls.Change Type
The following scenarios were tested
MeetingInfoV2sends the correlation header for a meeting-scoped request with Call Analyzer enabled.MeetingInfoV2omits the header when there is no meeting ID.MeetingInfoV2omits the header when Call Analyzer events are disabled.MeetingInfoV2omits the header when no correlation ID is available.@webex/plugin-meetingssource build passed.server.meeting.initiatedandserver.meetinginfo.responsewere absent.The GAI Coding Policy And Copyright Annotation Best Practices
Copyright annotation best practice followed: the implementation is original and does not copy third-party source material.
I certified that