-
Notifications
You must be signed in to change notification settings - Fork 36
Add request execution flow logger #1655
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 pull request introduces a new execution flow tracing and logging subsystem to track and debug execution paths throughout the authentication library. The feature enables developers to insert timestamped tags at key execution points, which can be later retrieved as JSON for performance analysis and debugging.
Changes:
- Added new execution flow subsystem with three core classes:
MSIDExecutionFlowBlob(individual event),MSIDExecutionFlow(collection of events), andMSIDExecutionFlowLogger(singleton manager) - Integrated execution flow logging into HTTP request lifecycle and silent token request flows with specific tracking tags
- Added comprehensive unit test coverage for all new classes with 2000+ lines of tests covering edge cases, concurrency, and integration scenarios
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
MSIDExecutionFlowBlob.h/.m |
Implements individual execution event blobs with tag, timestamp, thread ID, and custom metadata |
MSIDExecutionFlow.h/.m |
Manages a collection of execution blobs for a single flow with thread-safe operations |
MSIDExecutionFlowLogger.h/.m |
Singleton logger that manages multiple execution flows keyed by correlation ID |
MSIDExecutionFlowBlobTests.m |
Unit tests for blob creation, serialization, and edge cases (595 lines) |
MSIDExecutionFlowTests.m |
Unit tests for flow management, timestamp calculation, and capacity limits (690 lines) |
MSIDExecutionFlowLoggerTests.m |
Unit tests for logger registration, retrieval, flushing, and concurrency (719 lines) |
MSIDHttpRequest.m |
Integration of execution flow logging at HTTP request lifecycle checkpoints |
MSIDSilentTokenRequest.m |
Integration of execution flow logging for token cache age tracking |
project.pbxproj |
Xcode project configuration updates to include new source and test files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
IdentityCore/src/telemetry/execution_flow/MSIDExecutionFlowLogger.h
Outdated
Show resolved
Hide resolved
IdentityCore/src/telemetry/execution_flow/MSIDExecutionFlowLogger.h
Outdated
Show resolved
Hide resolved
IdentityCore/src/telemetry/execution_flow/MSIDExecutionFlowBlob.h
Outdated
Show resolved
Hide resolved
IdentityCore/src/telemetry/execution_flow/MSIDExecutionFlowLogger.m
Outdated
Show resolved
Hide resolved
IdentityCore/src/telemetry/execution_flow/MSIDExecutionFlowLogger.m
Outdated
Show resolved
Hide resolved
IdentityCore/src/telemetry/execution_flow/MSIDExecutionFlowLogger.h
Outdated
Show resolved
Hide resolved
IdentityCore/src/telemetry/execution_flow/MSIDExecutionFlowBlob.h
Outdated
Show resolved
Hide resolved
…ger.m Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ger.m Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ger.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ger.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot please double check |
|
@kaisong1990 I've opened a new pull request, #1656, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot can you revew the code again? |
|
@kaisong1990 I've opened a new pull request, #1657, to work on those changes. Once the pull request is ready, I'll request review from you. |
Proposed changes
Design doc
This pull request introduces a new "execution flow" logging and tracing subsystem to the project, along with related unit tests and integration into the
MSIDHttpRequestworkflow. The changes primarily add new source and header files, update the Xcode project to include these files in the appropriate build phases and groups, and add logging hooks to the HTTP request code.The most important changes are:
Execution Flow Subsystem Addition:
MSIDExecutionFlowBlob.h/.m,MSIDExecutionFlow.h/.m, andMSIDExecutionFlowLogger.h/.m, grouped under a newexecution_flowgroup in the Xcode project, and included them in the build phases and headers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Unit Test Coverage:
MSIDExecutionFlowBlobTests.m,MSIDExecutionFlowTests.m, andMSIDExecutionFlowLoggerTests.m, and registered them in the tests group and sources build phase. [1] [2] [3] [4] [5] [6]Integration with HTTP Request Flow:
MSIDExecutionFlowLoggerintoMSIDHttpRequest.mby importing the logger and inserting execution flow tags at key points in thesendWithBlock:method to trace request lifecycle events. [1] [2] [3]These changes collectively introduce a new mechanism for tracing and debugging execution flow, with supporting tests and initial usage in network request handling.
Type of change
Risk
Additional information
AB#3407672