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

Update logging for communication #2681

Merged
merged 3 commits into from
Jan 17, 2025
Merged

Update logging for communication #2681

merged 3 commits into from
Jan 17, 2025

Conversation

AE-MS
Copy link
Contributor

@AE-MS AE-MS commented Jan 15, 2025

Description

I was investigating a customer issue (#2669) and found that some of the existing log statements were a little misleading and also that we would benefit from a bit more logging, particularly around message passing/communications.

Main changes in the PR:

Adjust a potentially confusing log statement and add a new log statement when sending a message response to a child window (e.g., the authentication pop-up)

Validation

Validation performed:

  1. Ensure all existing tests passed
  2. Ensured that child window/auth window scenarios continue to work and new logging is seen with expected information (when logging is turned on):
common.js:1 teamsJs:communication:handleIncomingMessageFromChild (2025-01-17T00:35:55.823Z): Handler called in response to message c9ea3b32-2f2a-4d61-905d-c6523eea3d1e (legacy id: 0) from child. Returning response from handler to child, action: initialize. [047ae9b5-524f-4ce7-b3bb-fd2232c565f2] +0ms
...
common.js:1 teamsJs:communication:handleIncomingMessageFromChild (2025-01-17T00:35:55.835Z): No handler for message 1d3fce2d-085d-4c50-8fce-5036361a9d55 (legacy id: 1) from child found; relaying message on to parent, action: getContext. Relayed message will have a new id. [047ae9b5-524f-4ce7-b3bb-fd2232c565f2] +12ms
...
common.js:1 teamsJs:communication:handleIncomingMessageFromChild (2025-01-17T18:15:57.280Z): Sending message 8eb2d0b1-f2a4-4516-8afd-e9201699c9d9 (legacy id: 0) to child via postMessage, args = (2) ['authentication', 'web']) [c6f79d9e-8489-4510-9e34-970a4088c9d4] +0ms

Change file added:

Yes

@AE-MS AE-MS marked this pull request as ready for review January 17, 2025 18:46
@AE-MS AE-MS requested a review from a team as a code owner January 17, 2025 18:46
@AE-MS AE-MS enabled auto-merge (squash) January 17, 2025 19:07
@AE-MS AE-MS merged commit 6cb959a into main Jan 17, 2025
39 checks passed
@AE-MS AE-MS deleted the AE_MS/updated_comms_logging branch January 17, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants