Releases: jongpie/NebulaLogger
Added tracking of logging user's federation identifier
Core Unlocked Package Changes
This release adds new fields & automation to track the logging user's federation identifier - this field is used in SAML SSO (Single Sign-On) settings, and is often a person's unique identifier in multiple systems. By capturing it in Nebula Logger, it makes it easier for Salesforce logs to be tied to logs for the same user in other systems.
-
Added new long textarea (512) fields
LoggedByFederationIdentifier__c
onLogEntryEvent__e
andLog__c
to track the value ofSchema.User.FederationIdentifier
for the logging user -
Added new field
Log__c.HasLoggedByFederationIdentifier__c
to make it easier to filter/identify records where the user's federation ID has been populated -
Added field-level security (FLS) for the new
Log__c
fields to the permission setsLoggerAdmin
,LoggerLogViewer
, andLoggerEndUser
-
Added new field
Log__c.LoggedByFederationIdentifier__c
to the flexipageLogRecordPage
- it conditionally shows, based on the value of the other new field,Log__c.HasLoggedByFederationIdentifier__c
Big Object Archive Plugin Changes
- Renamed the Big Object index
LogEntryArchiveIndex.indexe-meta.xml
toLogEntryArchiveIndex.index-meta.xml
(indexe
-->index
) to fix an issue with newer versions of thesf
cli- This doesn't impact any functionality in the plugin, so there is not a new release for the plugin - just a small change to the metadata in the repo
Pipeline Changes
- Deleted several old scripts in
package.json
and in the directory./scripts/build
- Upgraded package dependencies & regenerated
package-lock.json
- Tweaked config in
.prettierrc
- Updated GitHub Actions in
build.yml
to use v4 (compatible with Node 20)
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.10...v4.13.11
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000027L98QAE
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000027L98QAE
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000027L98QAE
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000027L98QAE
AuthSession Bugfix for LWC Logging
Thanks to @Suryansh-2301 for reporting this bug!
Core Unlocked Package Changes
- Fixed #678 by removing the filter
ParentId = null
when queryingAuthSession
data inLoggerEngineDataSelector
- Added a small enhancement to store the
ParentId
of theAuthSession
record in the new fieldsLogEntryEvent__e.ParentSessionId__c
andLog__c.ParentSessionId__c
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.9...v4.13.10
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y0000027L04QAE
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y0000027L04QAE
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000027L04QAE
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000027L04QAE
Updated Logging Level Emojis
Thanks to @twentyTwo for suggesting & implementing these changes, and thanks to @PawelWozniak for the feedback!
Core Unlocked Package Changes
- Closed #665 in PR #672 by updating the formula field
LogEntry__c.LoggingLevelWithImage__c
to use different emojis for every logging level to make it easier to visually distinguish between them. Previously, the same emoji was used forDEBUG
,FINE
,FINER
, andFINEST
. The new list of emojis used are:ERROR
=> ⛔WARN
=>⚠️ DEBUG
=> 🐞INFO
=> ℹ️FINE
=> 👍FINER
=> 👌FINEST
=> 🌟
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.8...v4.13.9
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkHqQAK
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkHqQAK
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkHqQAK
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkHqQAK
Fixed logEntryMetadataViewer LWC's 'View Full Source' button not showing for non-admins
Core Unlocked Package Changes
-
Worked with @jamessimone to troubleshoot & fix some additional issues in the
logEntryMetadataViewer
LWC that prevented the 'View Full Source' button from showing up for non-admins. This involved 3 related changes- Added ApexClass access in the permission sets
LoggerAdmin
,LoggerLogViewer
,LoggerEndUser
for the Apex classLogEntryMetdataViewerController
to fix some permission errors that could occur in some orgs/situations. - Fixed some excessively large whitespace in the LWC caused by a present-but-not-visible spinner.
- Updated the
logEntryMetadataViewer
LWC to imperatively call Apex controller methods - using the@wire
annotation caused weird, silent failures when calling the Apex methods, but calling it imperatively seems to work wonderfully (and is more consistent with how the other LWCs in Nebula Logger are written).
- Added ApexClass access in the permission sets
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.7...v4.13.8
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkHbQAK
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkHbQAK
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkHbQAK
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkHbQAK
Fixed setScenario() function in logger LWC
Thanks to @rcastanosgonzalez for reporting and fixing this bug!
Core Unlocked Package Changes
- Fixed #666 issue in PR #667 by updating the logger LWC's function
setScenario()
to properly (and always) set the scenario on each log entry. Previously, the value was often incorrectly set tonull
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.6...v4.13.7
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkHRQA0
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkHRQA0
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkHRQA0
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkHRQA0
View Log Entry Metadata custom permission
Core Unlocked Package Changes
- Added new custom permission
CanViewLogEntryMetadata
so that users without query access toApexClass
andApexTrigger
can still see the source code in the LWClogEntryMetadataViewer
- Updated the permission set
LoggerAdmin
to assign the new custom permissionCanViewLogEntryMetadata
- Added some more test methods in
LogEntryMetadataViewerController_Tests
, and cleaned up some code inLogEntryMetadataViewerController
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.5...v4.13.6
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkGxQAK
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkGxQAK
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkGxQAK
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkGxQAK
Performance Improvements
Change Overview
Emoji legend: 🟢 new, 🗜internal change, ⚠something to be aware of
- 🟢 Adds new Logger Parameter CMDT record,
Store Heap Size Limit
, which relies on theStore Transaction Limits
Logger Parameter record to also be true. When set to true, theLogEntry__c.LimitsHeapSizeUsed__c
field is set. When set to false, that particular field is not set, and users of Nebula Logger performing bulk data uploads or other bulk data transactions where logging exists at an individual record level may well want to toggle this parameter to false, as it's the single greatest contributor to CPU speed slowdown when logging. - 🗜 Centralizes where field truncation is occurring for long text area fields so that less CPU time is spent looping through all of
Schema.LogEntryEvent__e
prior to publishing platform events - 🗜 Caches the
System.Limits
calls that are static for each transaction - 🗜 Simplifies stack trace parsing so that less CPU time is spent suppressing Nebula Logger classes when parsing
- 🗜 Eliminates duplicated calls to
LogEntryEventBuilder.getLogEntryEvent()
- 🗜 Centralizes how database results are logged within Nebula to enable consistent field truncation for any potential errors
- 🗜
Logger
class now delegates toLogEntryEventBuilder
instead of setting fields onSchema.LogEntryEvent__e
directly - ⚠ Changes how the
LogEntry__c.DatabaseResultJson__c
stores results: if you were passing a list of results with only one entry in it, that is now recorded as a single entry instead of a single entry in a list - ⚠ Changes how
Schema.LogEntryEvent__e.TimestampString__c
is set - previously, consumers could rewrite aSchema.LogEntryEvent__e.Timestamp__c
by callingLogEntryEventBuilder.getLogEntryEvent()
and resetting that field. Now,Schema.LogEntryEvent__e.TimestampString__c
is only set once when aLogEntryEventBuilder
instance is first configured and downstream consumers can call the instance methodLogEntryEventBuilder.setTimestamp(Datetime timestamp);
if they'd like to override the timestamp later on
All of these changes amount to a substantial performance increase, and performance can be monitored using the new LoggerBenchmarking_Tests
class
Benchmarking Stats
Here are some stats associated with this change when logging for 500 records (all times reported in milliseconds):
Branch | LoggerBenchmarking_Tests overall | LogEntryEventBuilder.getLogEntryEvent() | LogEntryEventBuilder() constructor | LoggerStackTrace.getCleansedStackTraceLines() |
---|---|---|---|---|
main | 16405 | 1554 | 4697 | 1278 |
main | 18178 | 1690 | 6309 | 1360 |
benchmarking-logger | 10377 | 4511 | 64 | 206 |
benchmarking-logger | 10416 | 4648 | 67 | 219 |
Additionally, LoggerDataStore.EventBus.TruncateStringFields
was taking anywhere from ~2130ms to ~2590ms to run in #651 and that method has been eliminated entirely.
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.4...v4.13.5
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkGnQAK
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkGnQAK
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkGnQAK
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkGnQAK
Added New Comments__c Field on LoggerParameter__mdt
Core Unlocked Package Changes
-
Added new field
LoggerParameter__mdt.Comments__c
as a place for admins & developers to store notes about why aLoggerParameter__mdt
record has been customized.- This is only intended for documentation purposes to help admins viewing the record in the org, as well as a way to document customizations in git/VCS
-
Updated
LoggerParameter__mdt
records to include the XML node for the newComments__c
field -
Scope creep: added missing project license info in several LWC files
-
Scope creep: added
.npmrc
file to explicitly set the npm registry
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.3...v4.13.4
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkFBQA0
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkFBQA0
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkFBQA0
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkFBQA0
Optionally Enforce Scenario-Based Logging Usage
Core Unlocked Package Changes
- Resolved #645 by adding the ability to optionally enforce using scenario-based logging. This is controlled by a new
LoggerParameter__mdt
record,RequireScenarioUsage
, and is disabled (false
) by default.- When set to
false
, specifying a scenario is completely optional. - When set to
true
, a scenario is required to be set before any logging can occur. If a logging method is called &; the current scenario is null/blank, then Nebula Logger will throw a runtime exception.
- When set to
- Upgraded
LoggerScenarioRecordPage
flexipage to use dynamic related lists forLog__c
andLogEntry__c
- Added missing field permission for
Log__c.TransactionScenario__c
toLoggerAdmin
permission set
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.2...v4.13.3
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkEwQAK
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkEwQAK
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkEwQAK
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkEwQAK
Track OrgLimits data on Log__c
🎉 🪵 💯 Nebula Logger's 100th Release! 💯 🪵 🎉
Yet another neat milestone for the project 🥳
Core Unlocked Package Changes
-
Resolved #630 by adding new functionality to automatically track organization limits data, returned by the class
System.OrgLimits
-
This data is automatically stored as JSON in the new field
Log__c.OrganizationLimits__c
-
You can disable storing this data, using the new
LoggerParameter__mdt
recordStoreOrganizationLimits
-
This data is displayed within a new "Organization Limits" tab on the
Log__c
flexipage, using a new LWClogOrganizationLimits
(shown below). The design of this LWC is intended to mimic the existing formula fields shown onLogEntry__c
that are used to track transaction limits.
-
-
Added another new
LoggerParameter__mdt
record,StoreTransactionLimits
, to control if transaction limits are retrieved from the classSystem.Limits
& stored onLogEntry__c
- Previously, transaction limits were always populated, with no way to disable it - using the
System.Limits
class does seem to have some overhead (namely, it uses CPU time), so being able to disable this functionality can, hilariously, help to reduce transaction limits usage.
- Previously, transaction limits were always populated, with no way to disable it - using the
-
loggerPageSection
LWC changes: Fixed some padding inloggerPageSection.html
so it's more consistent with 'real' field section headers
Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.13.1...v4.13.2
- SF CLI:
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001MkEmQAK
- SFDX CLI:
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001MkEmQAK
- Sandbox: https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkEmQAK
- Production: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y000001MkEmQAK