-
-
Notifications
You must be signed in to change notification settings - Fork 165
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 logging support for instances of RestRequest and RestResponse #613
Added logging support for instances of RestRequest and RestResponse #613
Conversation
106bfe6
to
7102d3d
Compare
1276dae
to
ae4c372
Compare
…seDetails() to store info on instances of System.RestResponse Also renamed existing flexipage sections 'HTTP Request' and 'HTTP Response' to 'HTTP Callout Request' and 'HTTP Callout Response' for clarity
…tDetails() to store info on instances of System.RestRequest
…ixed package generation for the managed package by including an empty copy of Admin.profile-meta.xml ಥ_ಥ Also updated both sfdx-project.json files to use the new flag 'scopeProfiles'
ae4c372
to
041aa2d
Compare
7f53a43
to
1934550
Compare
…me usage of the per-object limit Previously, these fields were all using the max length of 131072, which is overkill for these fields
1934550
to
358e0d7
Compare
d40c442
to
c4ae423
Compare
…due to the change being unsupported (of course)
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #613 +/- ##
==========================================
+ Coverage 95.66% 95.73% +0.06%
==========================================
Files 48 48
Lines 5215 5297 +82
==========================================
+ Hits 4989 5071 +82
Misses 226 226
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Core Unlocked Package Changes
Added logging support for instances of
RestRequest
andRestResponse
Resolved Ability to Log against RestRequest/RestResponse #514 by introducing new features & fields to support logging instances of
System.RestRequest
andSystem.RestResponse
that are used for Apex REST services:Added 2 new
global
instance methods inLogEntryBuilder
to provide a way to log instances ofSystem.RestRequest
andSystem.RestResponse
:global LogEntryEventBuilder setRestRequestDetails(System.RestRequest request);
global LogEntryEventBuilder setRestResponseDetails(System.RestResponse response);
Added 2 new
LoggerParameter__mdt
records to control logging of request & response headers when using the new builder methods. TheseLoggerParameter__mdt
records are equivalent to the recordStoreHttpResponseHeaderValues
(introduced in Nebula Loggerv4.11.8
) forSystem.HttpResponse
logging:StoreRestRequestHeaderValues
- this metadata records controls if the request's header values are stored in new fieldsLogEntryEvent__e.RestRequestHeaders__c
andLogEntryEvent__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__c
andLogEntryEvent__e.RestResponseHeaders__c
. By default, it's enabled.Added 9 new fields for
System.RestRequest
data onLogEntryEvent__e
platform eventLogEntryEvent__e.RestRequestBodyMasked__c
LogEntryEvent__e.RestRequestBody__c
LogEntryEvent__e.RestRequestHeaderKeys__c
LogEntryEvent__e.RestRequestHeaders__c
LogEntryEvent__e.RestRequestMethod__c
LogEntryEvent__e.RestRequestParameters__c
LogEntryEvent__e.RestRequestRemoteAddress__c
LogEntryEvent__e.RestRequestResourcePath__c
LogEntryEvent__e.RestRequestUri__c
Added 5 new fields for
System.RestResponse
data onLogEntryEvent__e
platform eventLogEntryEvent__e.RestResponseBodyMasked__c
LogEntryEvent__e.RestResponseBody__c
LogEntryEvent__e.RestResponseHeaderKeys__c
LogEntryEvent__e.RestResponseHeaders__c
LogEntryEvent__e.RestResponseStatusCode__c
Added 12 new fields for
System.RestResponse
data onLogEntry__c
custom objectLogEntry__c.HasRestRequestBody__c
LogEntry__c.HasRestRequestHeaderKeys__c
LogEntry__c.HasRestRequestHeaders__c
LogEntry__c.RestRequestBody__c
LogEntry__c.RestRequestBodyMasked__c
LogEntry__c.RestRequestHeaderKeys__c
LogEntry__c.RestRequestHeaders__c
LogEntry__c.RestRequestMethod__c
LogEntry__c.RestRequestParameters__c
LogEntry__c.RestRequestRemoteAddress__c
LogEntry__c.RestRequestResourcePath__c
LogEntry__c.RestRequestUri__c
Added 8 new fields for
System.RestResponse
data onLogEntry__c
custom objectLogEntry__c.HasRestResponseBody__c
LogEntry__c.HasRestResponseHeaderKeys__c
LogEntry__c.HasRestResponseHeaders__c
LogEntry__c.RestResponseBodyMasked__c
LogEntry__c.RestResponseBody__c
LogEntry__c.RestResponseHeaderKeys__c
LogEntry__c.RestResponseHeaders__c
LogEntry__c.RestResponseStatusCode__c
Updated permission sets
LoggerAdmin
,LoggerLogViewer
, andLoggerEndUser
to add access to the new custom fields onLogEntry__c
Add 2 new sections on
LogEntryRecordPage
flexipageApex REST Service Request
section shows the corresponding fields forRestRequest
data (when populated)Apex REST Service Response
section shows the corresponding fields forRestResponse
data (when populated)Renamed 2 existing sections on
LogEntryRecordPage
flexipage to help avoid confusion with the 2 new sectionsApex Rest Service Request
andApex REST Service Response
HTTP Request
is nowHTTP Callout Request
HTTP Response
is nowHTTP Callout Response
Reduced the Max Length of Several Existing Long Textarea Fields
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,000