-
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the ability to capture HttpRequest headers (#755)
* Added instance method overload LogEntryEventBuilder.setHttpRequestDetails(System.HttpRequest request, List<String> headersToLog) * Any header keys provided in headersToLog will now be logged * The existing overload, setHttpRequestDetails(System.HttpRequest request), will not log any header information * Added new LogEntryEvent__e fields HttpRequestHeaderKeys__c and HttpRequestHeaders__c to capture the specified list of header keys * Added new LoggerParameter__mdt record StoreHttpRequestHeaderValues to globally control if HttpResponse header values are stored when calling setHttpRequestDetails(System.HttpRequest request, List<String> headersToLog) * This new record mimics the existing record StoreHttpResponseHeaderValues (used for responses) * Added new LogEntry__c fields to store the HttpRequest header keys & values captured on LogEntryEvent__e, as well as some checkbox fields to aid with filtering in SOQL, list views, etc. * HttpRequestHeaderKeys__c * HasHttpRequestHeaderKeys__c - set to true when HttpRequestHeaderKeys__c is not null * HttpRequestHeaders__c * HasHttpRequestHeaders__c - set to true when HttpRequestHeaders__c is not null * Updated the flexipage LogEntryRecordPage to add the 2 new LogEntry__c fields HttpRequestHeaderKeys__c and HttpRequestHeaders__c * Both fields are conditionally displayed when populated, based on their corresponding checkbox fields HasHttpRequestHeaderKeys__c and HasHttpRequestHeaders__c (respectively) * Updated the existing list view AllHttpRequestLogEntries to include the new field HttpRequestHeaderKeys__c (HttpRequestHeader__c is intentionally not included at this time) * Updated build.yml to fail the build if the codecov upload action fails in the pipeline
- Loading branch information
Showing
32 changed files
with
467 additions
and
32 deletions.
There are no files selected for viewing
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
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
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
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
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
21 changes: 21 additions & 0 deletions
21
...ain/configuration/customMetadata/LoggerParameter.StoreHttpRequestHeaderValues.md-meta.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<label>Store HTTP Request Header Values</label> | ||
<protected>false</protected> | ||
<values> | ||
<field>Comments__c</field> | ||
<value xsi:nil="true"/> | ||
</values> | ||
<values> | ||
<field>Description__c</field> | ||
<value xsi:type="xsd:string">When set to 'true' (default), Nebula Logger will store the header values of any instance of an HttpRequest that is logged using the instance method LogEntryEventBuilder.setHttpRequestDetails(). | ||
|
||
When set to 'false', the header values are not stored or referenced by Nebula Logger. | ||
|
||
Regardless of how this parameter is configured, Nebula Logger will still log the specified list of header keys of any instance of an HttpRequest that is logged - this parameter only controls if the header values are stored.</value> | ||
</values> | ||
<values> | ||
<field>Value__c</field> | ||
<value xsi:type="xsd:string">true</value> | ||
</values> | ||
</CustomMetadata> |
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
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
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
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
11 changes: 11 additions & 0 deletions
11
...main/log-management/objects/LogEntry__c/fields/HasHttpRequestHeaderKeys__c.field-meta.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<fullName>HasHttpRequestHeaderKeys__c</fullName> | ||
<businessStatus>Active</businessStatus> | ||
<complianceGroup>None</complianceGroup> | ||
<defaultValue>false</defaultValue> | ||
<label>Has HTTP Request Header Keys</label> | ||
<securityClassification>Confidential</securityClassification> | ||
<trackTrending>false</trackTrending> | ||
<type>Checkbox</type> | ||
</CustomField> |
11 changes: 11 additions & 0 deletions
11
...re/main/log-management/objects/LogEntry__c/fields/HasHttpRequestHeaders__c.field-meta.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<fullName>HasHttpRequestHeaders__c</fullName> | ||
<businessStatus>Active</businessStatus> | ||
<complianceGroup>None</complianceGroup> | ||
<defaultValue>false</defaultValue> | ||
<label>Has HTTP Request Headers</label> | ||
<securityClassification>Confidential</securityClassification> | ||
<trackTrending>false</trackTrending> | ||
<type>Checkbox</type> | ||
</CustomField> |
12 changes: 12 additions & 0 deletions
12
...re/main/log-management/objects/LogEntry__c/fields/HttpRequestHeaderKeys__c.field-meta.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<fullName>HttpRequestHeaderKeys__c</fullName> | ||
<businessStatus>Active</businessStatus> | ||
<complianceGroup>None</complianceGroup> | ||
<label>HTTP Request Header Keys</label> | ||
<length>1000</length> | ||
<securityClassification>Confidential</securityClassification> | ||
<trackTrending>false</trackTrending> | ||
<type>LongTextArea</type> | ||
<visibleLines>5</visibleLines> | ||
</CustomField> |
12 changes: 12 additions & 0 deletions
12
.../core/main/log-management/objects/LogEntry__c/fields/HttpRequestHeaders__c.field-meta.xml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<fullName>HttpRequestHeaders__c</fullName> | ||
<businessStatus>Active</businessStatus> | ||
<complianceGroup>None</complianceGroup> | ||
<label>HTTP Request Headers</label> | ||
<length>5000</length> | ||
<securityClassification>Confidential</securityClassification> | ||
<trackTrending>false</trackTrending> | ||
<type>LongTextArea</type> | ||
<visibleLines>5</visibleLines> | ||
</CustomField> |
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
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
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
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
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
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
Oops, something went wrong.