Skip to content

Conversation

konstantin-msft
Copy link
Collaborator

@konstantin-msft konstantin-msft commented Oct 2, 2025

Remove redundant perf client and function wrapper logging. context telemetry field provides a func call tree so we don't need additional logging for that.

@konstantin-msft konstantin-msft marked this pull request as ready for review October 2, 2025 21:11
@konstantin-msft konstantin-msft requested a review from a team as a code owner October 2, 2025 21:11
@Copilot Copilot AI review requested due to automatic review settings October 2, 2025 21:11
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes redundant logging statements from performance client and function wrapper utilities to reduce noise in debug output. The changes focus on eliminating trace-level logging that provides minimal diagnostic value while maintaining error logging and telemetry functionality.

Key changes:

  • Removed trace logging from function wrapper execution flow
  • Eliminated verbose performance measurement logging from PerformanceClient
  • Updated corresponding test expectations to match reduced logging calls

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
lib/msal-common/src/utils/FunctionWrappers.ts Removed trace logs for function execution start and successful completion
lib/msal-common/src/telemetry/performance/PerformanceClient.ts Removed trace and info logs for measurement lifecycle events and field updates
lib/msal-common/test/utils/FunctionWrappers.spec.ts Updated test to reflect reduced logger call count after removing trace statements
lib/msal-browser/src/controllers/StandardController.ts Improved PKCE code logging message clarity (unrelated cleanup)
Comments suppressed due to low confidence (1)

lib/msal-common/test/utils/FunctionWrappers.spec.ts:66

  • The loggerSpy variable is removed but still used in the failure test case on line 94. This will cause a ReferenceError when the test runs.
            const loggerSpy = jest.spyOn(logger, "trace");

@konstantin-msft konstantin-msft enabled auto-merge (squash) October 2, 2025 21:55
@konstantin-msft konstantin-msft force-pushed the remove_redundant_perf_client_logging branch from a4351b4 to 6d71725 Compare October 3, 2025 12:33
correlationId: string
) => {
return (...args: T): U => {
logger.trace(`Executing function '${eventName}'`, correlationId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

For customers not using the performance client how do these things get logged?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is not going to be logged at all.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that's going to be a problem when we receive issues/ICMs from external customers not using the 1P lib

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This isn't going to be a problem for 3p customers unless they inject their own performanceClient.

Copy link
Collaborator

Choose a reason for hiding this comment

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

3P customers aren't using performanceClient at all, I think we need to leave these logs here for those scenarios

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