Skip to content

Commit

Permalink
Improved formula fields on LogEntry__c for transactional limits (#374)
Browse files Browse the repository at this point in the history
* Updated formula fields on LogEntry__c for limits to include a flag indicator (>= 90%: red, < 90 && >= 80: yellow, otherwise green), and to include the percentage of each limit used
  • Loading branch information
jongpie authored Sep 26, 2022
1 parent bade266 commit 1a4b9b6
Show file tree
Hide file tree
Showing 20 changed files with 362 additions and 25 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.

## Unlocked Package - v4.8.2
## Unlocked Package - v4.8.3

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lvuQAA)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lvuQAA)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lw9QAA)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lw9QAA)
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)

## Managed Package - v4.8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsAggregateQueriesUsed__c ) + &apos; / &apos; + TEXT(LimitsAggregateQueriesMax__c )</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsAggregateQueriesUsed__c / LimitsAggregateQueriesMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsAggregateQueriesUsed__c / LimitsAggregateQueriesMax__c * 100) &lt; 90 &amp;&amp; (LimitsAggregateQueriesUsed__c / LimitsAggregateQueriesMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsAggregateQueriesUsed__c ) + &apos; / &apos; + TEXT(LimitsAggregateQueriesMax__c ) + &apos; (&apos; + TEXT(ROUND(LimitsAggregateQueriesUsed__c / LimitsAggregateQueriesMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Aggregate Queries</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsAsyncCallsUsed__c) + &apos; / &apos; + TEXT(LimitsAsyncCallsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsAsyncCallsUsed__c / LimitsAsyncCallsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsAsyncCallsUsed__c / LimitsAsyncCallsMax__c * 100) &lt; 90 &amp;&amp; (LimitsAsyncCallsUsed__c / LimitsAsyncCallsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsAsyncCallsUsed__c) + &apos; / &apos; + TEXT(LimitsAsyncCallsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsAsyncCallsUsed__c / LimitsAsyncCallsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Async Calls</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsCalloutsUsed__c ) + &apos; / &apos; + TEXT(LimitsCalloutsMax__c )</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsCalloutsUsed__c / LimitsCalloutsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsCalloutsUsed__c / LimitsCalloutsMax__c * 100) &lt; 90 &amp;&amp; (LimitsCalloutsUsed__c / LimitsCalloutsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsCalloutsUsed__c ) + &apos; / &apos; + TEXT(LimitsCalloutsMax__c ) + &apos; (&apos; + TEXT(ROUND(LimitsCalloutsUsed__c / LimitsCalloutsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Callouts</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsCpuTimeUsed__c) + &apos; / &apos; + TEXT(LimitsCpuTimeMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsCpuTimeUsed__c / LimitsCpuTimeMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsCpuTimeUsed__c / LimitsCpuTimeMax__c * 100) &lt; 90 &amp;&amp; (LimitsCpuTimeUsed__c / LimitsCpuTimeMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsCpuTimeUsed__c) + &apos; / &apos; + TEXT(LimitsCpuTimeMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsCpuTimeUsed__c / LimitsCpuTimeMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>CPU Time</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsDmlRowsUsed__c) + &apos; / &apos; + TEXT(LimitsDmlRowsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsDmlRowsUsed__c / LimitsDmlRowsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsDmlRowsUsed__c / LimitsDmlRowsMax__c * 100) &lt; 90 &amp;&amp; (LimitsDmlRowsUsed__c / LimitsDmlRowsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsDmlRowsUsed__c) + &apos; / &apos; + TEXT(LimitsDmlRowsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsDmlRowsUsed__c / LimitsDmlRowsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>DML Rows</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsDmlStatementsUsed__c ) + &apos; / &apos; + TEXT(LimitsDmlStatementsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsDmlStatementsUsed__c / LimitsDmlStatementsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsDmlStatementsUsed__c / LimitsDmlStatementsMax__c * 100) &lt; 90 &amp;&amp; (LimitsDmlStatementsUsed__c / LimitsDmlStatementsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsDmlStatementsUsed__c ) + &apos; / &apos; + TEXT(LimitsDmlStatementsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsDmlStatementsUsed__c / LimitsDmlStatementsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>DML Statements</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsEmailInvocationsUsed__c) + &apos; / &apos; + TEXT(LimitsEmailInvocationsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsEmailInvocationsUsed__c / LimitsEmailInvocationsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsEmailInvocationsUsed__c / LimitsEmailInvocationsMax__c * 100) &lt; 90 &amp;&amp; (LimitsEmailInvocationsUsed__c / LimitsEmailInvocationsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsEmailInvocationsUsed__c) + &apos; / &apos; + TEXT(LimitsEmailInvocationsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsEmailInvocationsUsed__c / LimitsEmailInvocationsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Email Invocations</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsFutureCallsUsed__c ) + &apos; / &apos; + TEXT(LimitsFutureCallsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsFutureCallsUsed__c / LimitsFutureCallsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsFutureCallsUsed__c / LimitsFutureCallsMax__c * 100) &lt; 90 &amp;&amp; (LimitsFutureCallsUsed__c / LimitsFutureCallsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsFutureCallsUsed__c ) + &apos; / &apos; + TEXT(LimitsFutureCallsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsFutureCallsUsed__c / LimitsFutureCallsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Future Calls</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsHeapSizeUsed__c) + &apos; / &apos; + TEXT(LimitsHeapSizeMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsHeapSizeUsed__c / LimitsHeapSizeMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsHeapSizeUsed__c / LimitsHeapSizeMax__c * 100) &lt; 90 &amp;&amp; (LimitsHeapSizeUsed__c / LimitsHeapSizeMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsHeapSizeUsed__c) + &apos; / &apos; + TEXT(LimitsHeapSizeMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsHeapSizeUsed__c / LimitsHeapSizeMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Heap Size</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsMobilePushApexCallsUsed__c) + &apos; / &apos; + TEXT(LimitsMobilePushApexCallsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsMobilePushApexCallsUsed__c / LimitsMobilePushApexCallsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsMobilePushApexCallsUsed__c / LimitsMobilePushApexCallsMax__c * 100) &lt; 90 &amp;&amp; (LimitsMobilePushApexCallsUsed__c / LimitsMobilePushApexCallsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsMobilePushApexCallsUsed__c) + &apos; / &apos; + TEXT(LimitsMobilePushApexCallsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsMobilePushApexCallsUsed__c / LimitsMobilePushApexCallsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Mobile Push Apex Calls</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsPublishImmediateDmlStatementsUsed__c) + &apos; / &apos; + TEXT(LimitsPublishImmediateDmlStatementsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsPublishImmediateDmlStatementsUsed__c / LimitsPublishImmediateDmlStatementsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsPublishImmediateDmlStatementsUsed__c / LimitsPublishImmediateDmlStatementsMax__c * 100) &lt; 90 &amp;&amp; (LimitsPublishImmediateDmlStatementsUsed__c / LimitsPublishImmediateDmlStatementsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsPublishImmediateDmlStatementsUsed__c) + &apos; / &apos; + TEXT(LimitsPublishImmediateDmlStatementsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsPublishImmediateDmlStatementsUsed__c / LimitsPublishImmediateDmlStatementsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Publish Immediate DML Statements</label>
<required>false</required>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
<businessStatus>Active</businessStatus>
<complianceGroup>None</complianceGroup>
<externalId>false</externalId>
<formula>TEXT(LimitsQueueableJobsUsed__c) + &apos; / &apos; + TEXT(LimitsQueueableJobsMax__c)</formula>
<formula>IMAGE(
CASE(
IF(
(LimitsQueueableJobsUsed__c / LimitsQueueableJobsMax__c * 100) &gt;= 90,
&quot;red&quot;,
IF(
(LimitsQueueableJobsUsed__c / LimitsQueueableJobsMax__c * 100) &lt; 90 &amp;&amp; (LimitsQueueableJobsUsed__c / LimitsQueueableJobsMax__c * 100) &gt;= 80,
&quot;yellow&quot;,
&quot;green&quot;
)
),
&quot;green&quot;, &quot;/img/samples/flag_green.gif&quot;,
&quot;yellow&quot;, &quot;/img/samples/flag_yellow.gif&quot;,
&quot;red&quot;, &quot;/img/samples/flag_red.gif&quot;,
&quot;/s.gif&quot;
),
&apos;&apos;, 16, 16
)

+ &apos; &apos; +

TEXT(LimitsQueueableJobsUsed__c) + &apos; / &apos; + TEXT(LimitsQueueableJobsMax__c) + &apos; (&apos; + TEXT(ROUND(LimitsQueueableJobsUsed__c / LimitsQueueableJobsMax__c * 100, 2)) + &apos;%)&apos;</formula>
<formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
<label>Queueable Jobs</label>
<required>false</required>
Expand Down
Loading

0 comments on commit 1a4b9b6

Please sign in to comment.