-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Added more fields on LogEntryEvent__e, Log__c, and LogEntry__c #503
Conversation
…eVersion__c to OrganizationReleaseNumber__c and OrganizationReleaseVersion__c, added new field Log__c.OrganizationLocation__c
…s where OriginLocation__c is not a valid Flow API name
…iggerOrder__c, and FlowTriggerSObjectType__c
…ction, getComponentLogEntry() This makes the JavaScript code (logEntryBuilder.js + ComponentLogEntry) better align with the Apex equivalent code (LogEntryEventBuilder and LogEntryEvent__e)
…ved properties on Logger.StatusApiResponse
…yEvent__e.OrganizationApiVersion__c, finished some backend changes for several related field deprecations
f61c037
to
128fdc7
Compare
0827c56
to
157b2d1
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #503 +/- ##
==========================================
- Coverage 95.07% 94.94% -0.13%
==========================================
Files 59 59
Lines 5944 5994 +50
Branches 129 129
==========================================
+ Hits 5651 5691 +40
- Misses 288 298 +10
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
This PR is focused on automatically capturing & storing some new data points (in a few different areas) that provide additional context for monitoring & reporting.
Logging in Lightning Components: New "Browser Details" fields on
LogEntry__c
Resolved Track additional UI details #225 by updating the
logger
LWC (logEntryBuilder.js
mostly) to capture details about the user's browser & screen. These details are automatically now stored in these new fields onLogEntryEvent__e
andLogEntry__c
:LogEntryEvent__e.BrowserFormFactor__c
andLogEntry__c.BrowserFormFactor__c
FORM_FACTOR
, imported usingimport FORM_FACTOR from '@salesforce/client/formFactor';
LogEntryEvent__e.BrowserLanguage__c
andLogEntry__c.BrowserLanguage__c
window.navigator.language
LogEntryEvent__e.BrowserScreenResolution__c
andLogEntry__c.BrowserScreenResolution__c
window.screen.availWidth + ' x ' + window.screen.availHeight
LogEntryEvent__e.BrowserUrl__c
andLogEntry__c.BrowserUrl__c
window.location.href
LogEntryEvent__e.BrowserUserAgent__c
andLogEntry__c.BrowserUserAgent__c
window.navigator.userAgent
LogEntryEvent__e.BrowserWindowResolution__c
andLogEntry__c.BrowserWindowResolution__c
window.innerWidth + ' x ' + window.innerHeight
Logging in Flow: New Flow Metadata fields on
LogEntry__c
Resolved Capture more fields from FlowDefinitionView #451 by capturing some additional details about the running Flow via the object
FlowDefinitionView
. These details are automatically now stored in these new fields:LogEntry__c.FlowRecordTriggerType__c
FlowDefinitionView.RecordTriggerType
LogEntry__c.FlowTriggerOrder__c
FlowDefinitionView.TriggerOrder
LogEntry__c.FlowTriggerSObjectType__c
FlowDefinitionView.TriggerObjectOrEvent.QualifiedApiName
Organization Details: New & Deprecated fields on
LogEntryEvent__e
andLog__c
"Renamed" (by creating new fields) some fields on
LogEntryEvent__e
andLog__c
to have a more consistent naming convention. Note that the old fields are still included in the core package and are still populated so that orgs have time to update any existing reporting, etc. Eventually, the old fields will be fully removed from the package.Log__c.ApiReleaseNumber__c
and replaced it withLog__c.OrganizationReleaseNumber__c
https://api.status.salesforce.com
Log__c.ApiReleaseVersion__c
and replaced it withLog__c.OrganizationReleaseVersion__c
https://api.status.salesforce.com
LogEntryEvent__e.ApiVersion__c
andLog__c.ApiVersion__c
and replaced them withLogEntryEvent__e.OrganizationApiVersion__c
andLog__c.OrganizationApiVersion__c
Logger.getOrganizationVersion()
Log__c.OrganizationLocation__c
https://api.status.salesforce.com
Logger Engine Changes
Made some internal changes to the
logger
LWC so that the JavaScript code's approach more closely aligns with the Apex code's approach. This should not have any functional changes (hopefully 😅), this is just to try to provide a little more consistency within the codebase for approaching the same goal (logging) in 2 different languages (Apex & JavaScript).LogEntryEvent__e
objectComponentLogEntry
inner class inlogEntryBuilder.js
LogEntryEventBuilder.getLogEntryEvent()
LogEntryEventBuilder.getComponentLogEntry()
inlogEntryBuilder.js
Bugfixes
LogEntryHandler.setFlowDefinitionFields()
to prevent a possibleNullPointerException
. Previously, the code assumed that whenOriginLocation__c == 'Flow'
, thenOriginLocation__c
would be the API name of the logging Flow. However, this may not always be the case, especially since the invocable actions currently rely on admins/devs to provide the Flow's API name, which is inherently an imperfect approach - but there isn't currently a way in Apex or Flow to automatically determine the Flow's API name, so the new guard clause helps avoid an exception.