Skip to content

Say that lineNumber is the call site in the caller's file #136

Description

@lukecotter

Every apexlog_list_slow_operations row carries lineNumber, and nothing says what it is a line of. It is the call site in the caller's file — never a line in the callee.

Verified against the extension repo's sample-app. lineNumber is parseLineNumber(parts[2]) — the [42] bracket on the log line:

log line AccountService.cls
METHOD_ENTRY|[11]|AccountService.getRevenue() 11: Decimal revenue = getRevenue();
DML_BEGIN|[36]|Op:Insert|Type:Account 36: insert accountsToInsert;
SYSTEM_METHOD_ENTRY|[19]|List<Account>.add(Object) 19: accountsToInsert.add(acc);

An agent that reads it as the callee's line opens the wrong file.

Change

The SlowOperation.lineNumber doc comment and the tool description. No response change and no new column.

Measured

60 real logs, the default grouped top ten, 583 rows:

kind rows null EXTERNAL
method 270 0 28
codeUnit 90 90 0
soql 81 0 0
systemMethod 66 50 0
flow 37 37 0
dml 27 0 0
workflow 7 7 0
managedPackage 5 5 0

Null on 32.4%, but structurally so: codeUnit, flow, workflow and managedPackage have no Apex call site. Every kind that has one reports it.

Blocks 2.0.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions