-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Store HttpResponse header values #564
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rs__c and LogEntry__c.HttpResponseHeaders__c that store the full key-value pair for each header
…o globally control if HttpResponse header values are stored
e9346d7
to
ef676e4
Compare
TrangOul
reviewed
Oct 5, 2023
nebula-logger/core/main/logger-engine/classes/LogEntryEventBuilder.cls
Outdated
Show resolved
Hide resolved
… Booleans from 'if(condition == true)' to just 'if(condition)'
060b676
to
668f2d1
Compare
Codecov ReportAttention:
📢 Thoughts on this report? Let us know!. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
log management
Items related to the custom objects & Logger Console app
logger engine
Items related to the core logging engine
reporting
Anything related to reports, dashboards, and the underlying data model
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Feature: Store
HttpResponse
Header ValuesResolved Log headers from HttpResponse (and possibly HttpRequest) objects #561 (reported by @TrangOul) by adding new fields
LogEntryEvent__e.HttpResponseHeaders__c
andLogEntry__c.HttpResponseHeaders__c
that store the full key-value pair for each header set on the logged instance ofSystem.HttpResponse
. These fields are now automatically set when using the instance methodLogEntryEventBuilder.setHttpResponseDetails(System.HttpResponse)
.Header: value
to match the (HTTP standard). A\n
line break is used as a delimiter between each header when there are multiple headers.LoggerParameter__mdt
recordStoreHttpResponseHeaderValues
tofalse
. By default, this feature is enabled/set totrue
LogEntryEvent__e.HttpResponseHeaderKeys__c
andLogEntry__c.HttpResponseHeaderKeys__c
will continue to be populated. These fields store only the header keys, not the header values, and some orgs have existing tests & logic that rely on checking the logged keys. These fields are always populated for instances ofSystem.HttpResponse
, regardless of the configuration of the newLoggerParameter__mdt
recordStoreHttpResponseHeaderValues
.Updated permission sets
LoggerAdmin
andLoggerLogViewer
to haveread
access to the new fieldLogEntry__c.HttpResponseHeaders__c
.LoggerEndUser
intentionally does not have access to this field (or any other fields related toHttpResponse
orHttpRequest
).Added new field
LogEntry__c.HttpResponseHeaders__c
to the FlexiPageLogEntryRecordPage
. This field is shown in addition to the existing fieldLogEntry__c.HttpResponseHeaderKeys__c
, shown in the (massive 😅) screenshot belowUpdated Internal Coding Conventions for Apex
if
Statementsif
statements throughout the codebase to simplify checking Booleans fromif(condition == true)
to justif(condition)
. A few existing Booleans were also updated to have a default value to avoid issues withnull
values.