LIMIT_USAGE section for Second-Generation Managed Package (2GP) is not available in debug logs
Last updated 2022-02-10 ·Reference W-8379197 ·Reported By 18 users
Summary
LIMIT_USAGE section for Second-Generation Managed Package (2GP) is not available in debug logs.
Repro
1) Create a 2GP managed package. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_create_pkg.htm for instructions.
2) Add the following Apex classes to the 2GP managed package:
---
global class DBHelper {
global DBHelper() {
}
global String getQuery() {
return null;
}
global List<SObject> runQuery(String query) {
return null;
}
}
---
@isTest
private class TestDBHelper {
static testMethod void validateQ() {
Account a = new Account(Name='Behind the Cloud');
insert a;
DBHelper dbHelper = new DBHelper();
dbHelper.runQuery(dbHelper.getQuery());
}
}
---
3) Sign up a new Enterprise Edition org, and perform the following steps:
3.1) Install the 2GP managed package.
3.2) Go to the Developer Console and run the following anonymous Apex code:
DBHelper dbHelper = new DBHelper();
dbHelper.runQuery(dbHelper.getQuery());
Actual result: No SOQL usage will be available for the managed namespace, only under default section.
Expected result: LIMIT_USAGE section for 2GP managed package's namespace should be available in debug log.
Workaround
N/A
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.