-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add debug event support #1048
Add debug event support #1048
Conversation
Ran swiftFormat and fixed a bunch of whitespace issues, apologies for the extra file changes. |
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.
looks good with one little recommendation to clean up the implementation of the extension vars
var debugEventType: String? { | ||
if let debugType = debugEventData?[Event.DEBUG_EVENT_TYPE_KEY] as? String { | ||
return debugType | ||
} | ||
return nil | ||
} |
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.
i think we can just clean these up like this:
var debugEventType: String? {
debugEventData?[Event.DEBUG_EVENT_TYPE_KEY] as? String
}
The SDKs often needs to change its standard business logic to enable debugging/testing workflows. We need an event structure that external systems can follow to generate an event that communicates to the listening SDK extension that it should operate in a debug mode - a mode outside of expected production behavior if one exists.
This commit adds an eventSource "com.adobe.eventSource.debug" to identify such events.
Further, it adds utility methods to identify the eventType and eventSource provided within the
data.debug
content of such events.Structure:
Usage:
Related Issue
Motivation and Context
The SDKs often needs to change its standard business logic to enable debugging/testing workflows. We need an event structure that external systems can follow to generate an event that communicates to the listening SDK extension that it should operate in a debug mode - a mode outside of expected production behavior if one exists.
This commit adds an eventSource "com.adobe.eventSource.debug" to identify such events.
Further, it adds utility methods to identify the eventType and eventSource provided within the
data.debug
content of such events.How Has This Been Tested?
Screenshots (if appropriate):
n/a
Types of changes
Checklist: