Skip to content

Releases: jongpie/NebulaLogger

Added tracking of logging user's federation identifier

29 Apr 16:52
4d56ecb
Compare
Choose a tag to compare

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 on LogEntryEvent__e and Log__c to track the value of Schema.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 sets LoggerAdmin, LoggerLogViewer, and LoggerEndUser

  • Added new field Log__c.LoggedByFederationIdentifier__c to the flexipage LogRecordPage - it conditionally shows, based on the value of the other new field, Log__c.HasLoggedByFederationIdentifier__c

    image

Big Object Archive Plugin Changes

  • Renamed the Big Object index LogEntryArchiveIndex.indexe-meta.xml to LogEntryArchiveIndex.index-meta.xml (indexe --> index) to fix an issue with newer versions of the sf 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

AuthSession Bugfix for LWC Logging

24 Apr 01:50
18b4b52
Compare
Choose a tag to compare

Thanks to @Suryansh-2301 for reporting this bug!

Core Unlocked Package Changes

  • Fixed #678 by removing the filter ParentId = null when querying AuthSession data in LoggerEngineDataSelector
  • Added a small enhancement to store the ParentId of the AuthSession record in the new fields LogEntryEvent__e.ParentSessionId__c and Log__c.ParentSessionId__c
    • Updated permission sets LoggerAdmin, LoggerLogViewer, and LoggerEndUser to provide read access to the new field Log__c.ParentSessionId__c

    • Updated FlexiPage LogRecordPage to conditionally display the new field Log__c.ParentSessionId__c when it's populated

      image

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.9...v4.13.10

Updated Logging Level Emojis

18 Apr 02:59
fcb3b43
Compare
Choose a tag to compare

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 for DEBUG, FINE, FINER, and FINEST. 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

Fixed logEntryMetadataViewer LWC's 'View Full Source' button not showing for non-admins

18 Apr 01:33
de8088d
Compare
Choose a tag to compare

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

    1. Added ApexClass access in the permission sets LoggerAdmin, LoggerLogViewer, LoggerEndUser for the Apex class LogEntryMetdataViewerController to fix some permission errors that could occur in some orgs/situations.
    2. Fixed some excessively large whitespace in the LWC caused by a present-but-not-visible spinner.
    3. 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).

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.7...v4.13.8

Fixed setScenario() function in logger LWC

17 Apr 00:49
f4addfd
Compare
Choose a tag to compare

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 to null

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.6...v4.13.7

View Log Entry Metadata custom permission

02 Apr 15:23
8233697
Compare
Choose a tag to compare

Core Unlocked Package Changes

  • Added new custom permission CanViewLogEntryMetadata so that users without query access to ApexClass and ApexTrigger can still see the source code in the LWC logEntryMetadataViewer
  • Updated the permission set LoggerAdmin to assign the new custom permission CanViewLogEntryMetadata
  • Added some more test methods in LogEntryMetadataViewerController_Tests, and cleaned up some code in LogEntryMetadataViewerController

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.5...v4.13.6

Performance Improvements

29 Mar 16:39
6453b17
Compare
Choose a tag to compare

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 the Store Transaction Limits Logger Parameter record to also be true. When set to true, the LogEntry__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 to LogEntryEventBuilder instead of setting fields on Schema.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 a Schema.LogEntryEvent__e.Timestamp__c by calling LogEntryEventBuilder.getLogEntryEvent() and resetting that field. Now, Schema.LogEntryEvent__e.TimestampString__c is only set once when a LogEntryEventBuilder instance is first configured and downstream consumers can call the instance method LogEntryEventBuilder.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

Added New Comments__c Field on LoggerParameter__mdt

14 Mar 01:46
b3a08f0
Compare
Choose a tag to compare

Core Unlocked Package Changes

  • Added new field LoggerParameter__mdt.Comments__c as a place for admins & developers to store notes about why a LoggerParameter__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

    image

  • Updated LoggerParameter__mdt records to include the XML node for the new Comments__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

Optionally Enforce Scenario-Based Logging Usage

13 Mar 18:57
f6b0afc
Compare
Choose a tag to compare

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.
  • Upgraded LoggerScenarioRecordPage flexipage to use dynamic related lists for Log__c and LogEntry__c
  • Added missing field permission for Log__c.TransactionScenario__c to LoggerAdmin permission set

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.13.2...v4.13.3

Track OrgLimits data on Log__c

12 Mar 22:52
11964ad
Compare
Choose a tag to compare

🎉 🪵 💯 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 record StoreOrganizationLimits

    • This data is displayed within a new "Organization Limits" tab on the Log__c flexipage, using a new LWC logOrganizationLimits (shown below). The design of this LWC is intended to mimic the existing formula fields shown on LogEntry__c that are used to track transaction limits.

      image

      • For comparison, this image shows the existing formula fields on LogEntry__c that are used to track transaction limits.

        image

  • Added another new LoggerParameter__mdt record, StoreTransactionLimits, to control if transaction limits are retrieved from the class System.Limits & stored on LogEntry__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.
  • loggerPageSection LWC changes: Fixed some padding in loggerPageSection.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