Skip to content
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 new LoggerParameter__mdt record to enable/disable logEntryEventStream lwc #488

Closed
jongpie opened this issue May 4, 2023 · 0 comments · Fixed by #507
Closed

Add new LoggerParameter__mdt record to enable/disable logEntryEventStream lwc #488

jongpie opened this issue May 4, 2023 · 0 comments · Fixed by #507
Labels
Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Salesforce Feature: Platform Events Items related to how platform events are leveraged by Nebula Logger Type: Enhancement New feature or request

Comments

@jongpie
Copy link
Owner

jongpie commented May 4, 2023

Currently, the lwc logEntryEventStream uses the emp API to subscribe/display a stream of LogEntryEvent__e platform events. Based on the docs for Platform Event Allocations, using empApi in lightning components counts towards an org's limits for delivery allocations.

image

In case some orgs would like to avoid consuming this limit, there should be a new LoggerParameter__mdt record that provides the ability to enable/disable the component (and prevents usage of empApi)

  • When enabled: existing functionality, logEntryEventStream operates normally
  • When disabled: logEntryEventStream does not call any empApi functions, and a message is displayed to indicate that an admin has disabled the component
@jongpie jongpie added Type: Enhancement New feature or request Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Salesforce Feature: Platform Events Items related to how platform events are leveraged by Nebula Logger labels May 4, 2023
jongpie added a commit that referenced this issue Jun 6, 2023
…ventStream - when set to false, the buttons on the LWC are hidden, input elements are disabled, and a warning message is displayed
jongpie added a commit that referenced this issue Jun 29, 2023
* Updated metadata to API v58.0 (Summer '23 release)

* Updated some picklist values to have options for API v58.0 and 59.0

* Updated some calls to String.join() to remove extra conversions of Set<String> to List<String> - Summer '23 supports iterating over Set<Object> now

* Retrieved the metadata for fields & object so the repo's version more closely matches the XML returned by the platform

* Added "Nebula Logger" as a label prefix for metadata types AnimationRule, CustomPermission, FlexiPage, GlobalValueSet, LWCs, PermissionSet, VF page

* Resolved #488 by adding new LoggParameter__mdt record EnableLogEntryEventStream - when set to false, the buttons on the LWC are hidden, input elements are disabled, and a warning message is displayed

* Added missing unit test for a recently-added guard clause in LogManagemenetDataSelector

* Added link in Logger.cls to Trust API's docs site

* Added conditional rendering to the release notes button in LWC loggerHomeHeader to only show if Logger's version number has been loaded

* Added new control on logEntryEventStream LWC to set the max number of events to deliver before the component auto-pauses the stream. This helps avoid unintentionally consuming the org's daily limit for platform event delivery allocations

* Updated LoggerHomePage flexipage to always display LoggerAdmin dashboard (even when there are errors), removed <runningUser> XML node in LoggerAdmin dashboard

* Updated loggerHomePage LWC to display summary info about Nebula Logger plugins installed in the current org

* Excluding the custom index on LogEntry__c.OriginLocation__c from the managed package via .forceignore. One person reported a gack when deploying the metadata from GitHub, so as a precaution, I'm excluding it from the managed package this release

* Added version-specific release note link in the manage package's sfdx-project.json file

* Slightly updated the commit message used in build.yml

* Added sf commands to README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Salesforce Feature: Platform Events Items related to how platform events are leveraged by Nebula Logger Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant