Apex Interactions

Each record in your package usage log that has a custom_entity_type of ApexClass or ApexTrigger describes an interaction with your packaged Apex class or trigger.

Available in: both Salesforce Classic and Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions

When log_record_type is ApexExecution, the log record is associated with a user action that resulted in the execution of Apex code from an Apex class or trigger. Only the outermost Apex is captured.

Standard DataSupplemental Data
  • entry_point
  • quiddity
num_soql_queries

When log_record_type is ApexUnexpectedException, the log record is associated with a user action that resulted in an Apex class or trigger throwing an unhandled exception. The stack_trace field provides detail about the Apex unexpected exceptions.

Standard DataSupplemental Data
stack_tracenone

Let’s look at an example package usage log record and analyze the Apex interaction.

The InsuranceAgentDetailsBatchable packaged component of type ApexClass was interacted with as a result of a user action from subscriber org MyCustomer Inc. Specifically, an execution of a batch Apex job occurred on 2022-11-22 at 6:19 am. The batch Apex job is represented by Quiddity = A.

The key data in this analysis are:

QuestionFieldValue
What
  • custom_entity
  • custom_entity_type
  • package_version_id
  • managed_package_namespace
  • InsuranceDetailsBatchable
  • ApexClass
  • 04txx0000004Idi
  • Admc
Who
  • organization_id
  • user_id_token
  • 00Dxx0000006H2l
  • 005-9BwnBWYO5FMn4cZ1sLw7F3LmTpoe8M77GrZOZHL6xQk=
How
  • log_record_type
  • quiddity
  • ApexExecution
  • A
Whentimestamp_derived2022-11-22T06:19:33.990Z

See Also