v4.12.9 - Added RestRequest and RestResponse Logging #622
jongpie
announced in
Announcements
Replies: 1 comment 1 reply
-
|
@jongpie How can we use the new methods setRestRequestDetails. I can't see any traces of it in logger? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks to @diegocomi for suggesting this enhancement!
Core Unlocked Package Changes
Added logging support for instances of
RestRequestandRestResponseResolved Ability to Log against RestRequest/RestResponse #514 (suggested by @diegocomi) in PR Added logging support for instances of RestRequest and RestResponse #613 by introducing new features & fields to support logging instances of
System.RestRequestandSystem.RestResponsethat are used for Apex REST services:Added 2 new
globalinstance methods inLogEntryBuilderto provide a way to log instances ofSystem.RestRequestandSystem.RestResponse:global LogEntryEventBuilder setRestRequestDetails(System.RestRequest request);global LogEntryEventBuilder setRestResponseDetails(System.RestResponse response);Added 2 new
LoggerParameter__mdtrecords to control logging of request & response headers when using the new builder methods. TheseLoggerParameter__mdtrecords are equivalent to the recordStoreHttpResponseHeaderValues(introduced in Nebula Loggerv4.11.8) forSystem.HttpResponselogging:StoreRestRequestHeaderValues- this metadata records controls if the request's header values are stored in new fieldsLogEntryEvent__e.RestRequestHeaders__candLogEntryEvent__e.RestrequestHeaders__c. By default, it's enabled.StoreRestResponseHeaderValues- this metadata records controls if the response's header values are stored in new fieldsLogEntryEvent__e.RestResponseHeaders__candLogEntryEvent__e.RestResponseHeaders__c. By default, it's enabled.Added 9 new fields for
System.RestRequestdata onLogEntryEvent__eplatform eventLogEntryEvent__e.RestRequestBodyMasked__cLogEntryEvent__e.RestRequestBody__cLogEntryEvent__e.RestRequestHeaderKeys__cLogEntryEvent__e.RestRequestHeaders__cLogEntryEvent__e.RestRequestMethod__cLogEntryEvent__e.RestRequestParameters__cLogEntryEvent__e.RestRequestRemoteAddress__cLogEntryEvent__e.RestRequestResourcePath__cLogEntryEvent__e.RestRequestUri__cAdded 5 new fields for
System.RestResponsedata onLogEntryEvent__eplatform eventLogEntryEvent__e.RestResponseBodyMasked__cLogEntryEvent__e.RestResponseBody__cLogEntryEvent__e.RestResponseHeaderKeys__cLogEntryEvent__e.RestResponseHeaders__cLogEntryEvent__e.RestResponseStatusCode__cAdded 12 new fields for
System.RestResponsedata onLogEntry__ccustom objectLogEntry__c.HasRestRequestBody__cLogEntry__c.HasRestRequestHeaderKeys__cLogEntry__c.HasRestRequestHeaders__cLogEntry__c.RestRequestBody__cLogEntry__c.RestRequestBodyMasked__cLogEntry__c.RestRequestHeaderKeys__cLogEntry__c.RestRequestHeaders__cLogEntry__c.RestRequestMethod__cLogEntry__c.RestRequestParameters__cLogEntry__c.RestRequestRemoteAddress__cLogEntry__c.RestRequestResourcePath__cLogEntry__c.RestRequestUri__cAdded 8 new fields for
System.RestResponsedata onLogEntry__ccustom objectLogEntry__c.HasRestResponseBody__cLogEntry__c.HasRestResponseHeaderKeys__cLogEntry__c.HasRestResponseHeaders__cLogEntry__c.RestResponseBodyMasked__cLogEntry__c.RestResponseBody__cLogEntry__c.RestResponseHeaderKeys__cLogEntry__c.RestResponseHeaders__cLogEntry__c.RestResponseStatusCode__cUpdated permission sets
LoggerAdmin,LoggerLogViewer, andLoggerEndUserto add access to the new custom fields onLogEntry__cAdd 2 new sections on
LogEntryRecordPageflexipage (shown in the screenshot below)Apex REST Service Requestsection shows the corresponding fields forRestRequestdata (when populated)Apex REST Service Responsesection shows the corresponding fields forRestResponsedata (when populated)Renamed 2 existing sections on
LogEntryRecordPageflexipage to help avoid confusion with the 2 new sectionsApex Rest Service RequestandApex REST Service ResponseHTTP Requestis nowHTTP Callout RequestHTTP Responseis nowHTTP Callout ResponseReduced the Max Length of Several Existing Long Textarea Fields
As Nebula Logger's data model continues to grow, the per-object limit for long textarea fields becomes increasingly important to consider. To compensate for this limit, and to better reflect the amount of data typically stored in these fields, several older fields have been updated to reduce their max length:
LogEntryEvent__e.ExceptionMessage__c: 131,072 limit reduced to 5,000LogEntryEvent__e.ExceptionStackTrace__c: 131,072 limit reduced to 5,000LogEntryEvent__e.StackTrace__c: 131,072 limit reduced to 5,000LogEntryEvent__e.Topics__c(deprecated/no longer used): 131,072 limit reduced to 256LogEntry__c.ExceptionMessage__c: 131,072 limit reduced to 5,000LogEntry__c.ExceptionStackTrace__c: 131,072 limit reduced to 5,000LogEntry__c.FlowDescription__c: 131,072 limit reduced to 5,000LogEntry__c.StackTrace__c: 131,072 limit reduced to 5,000Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.12.8...v4.12.9
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001Mk7BQASsfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001Mk7BQASThis discussion was created from the release Added RestRequest and RestResponse Logging.
Beta Was this translation helpful? Give feedback.
All reactions