この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

Apex のインタラクション

パッケージ利用状況ログで custom_entity_typeApexClass または ApexTrigger である各レコードは、パッケージ化された Apex クラスまたはトリガーとのインタラクションを記述します。
使用可能なインターフェース: Salesforce Classic および Lightning Experience の両方
使用可能なエディション: Enterprise Edition、Performance Edition、Unlimited Edition、および Developer Edition

Apex 実行

log_record_typeApexExecution である場合、ログレコードは、Apex クラスまたはトリガーの Apex コードが実行される原因となったユーザーアクションに関連付けられています。最も外側の Apex のみが取得されます。

標準データ 追加データ
  • entry_point
  • quiddity
num_soql_queries

予期しない Apex 例外

log_record_typeApexUnexpectedException である場合、ログレコードは、Apex クラスまたはトリガーが未処理の例外をスローする原因となったユーザーアクションに関連付けられています。stack_trace 項目には、予期しない Apex 例外の詳細が書き込まれます。

標準データ 追加データ
stack_trace なし

では、パッケージ利用状況ログレコードの例で、Apex のインタラクションを分析してみましょう。

1{
2     "timestamp_derived": "2022-11-22T06:19:33.990Z",
3     "log_record_type": "ApexExecution",
4     "request_id": "4mbhxFWBBXz83tlq2Z5aAk",
5     "organization_id": "00Dxx0000006H2l",
6     "organization_name": "MyCustomer Inc.",
7     "organization_status": "Demo",
8     "organization_edition": "Enterprise Edition",
9     "organization_country_code": "IN",
10     "organization_language_locale": "en_US",
11     "organization_time_zone": "Australia/Sydney",
12     "organization_instance": "GS0",
13     "organization_type": "Production",
14     "user_id_token": "005-9BwnBWYO5FMn4cZ1sLw7F3LmTpoe8M77GrZOZHL6xQk=",
15     "user_type": "Standard",
16     "package_id": "033xx0000004FqD",
17     "package_version_id": "04txx0000004Idi",
18     "managed_package_namespace": "Acme",
19     "custom_entity": "InsuranceDetailsBatchable",
20     "custom_entity_type": "ApexClass",
21     "session_key": "2l4YtFB/RmsRKVsS",
22     "login_key": "fGV6RgVOH3ZCgl2v",
23     "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/IP_ADDRESS_REMOVED Safari/537.36",
24     "user_country_code": "US",
25     "user_time_zone": "America/Los_Angeles",
26     "entry_point": "Acme.InsuranceDetailsBatchable",
27     "num_soql_queries": "2",
28     "quiddity": "A"
29}

登録者組織 MyCustomer Inc. からのユーザーアクションの結果として、パッケージ化された ApexClass 種別の InsuranceAgentDetailsBatchable コンポーネントが操作されています。具体的には、2022 年 11 月 22 日午前 6 時 19 分に、Apex 一括処理ジョブが実行されています。Apex 一括処理ジョブは Quiddity = A で表されています。

この分析の主要なデータは次のとおりです。

質問 項目
何を
  • custom_entity
  • custom_entity_type
  • package_version_id
  • managed_package_namespace
  • InsuranceDetailsBatchable
  • ApexClass
  • 04txx0000004Idi
  • Admc
誰が
  • organization_id
  • user_id_token
  • 00Dxx0000006H2l
  • 005-9BwnBWYO5FMn4cZ1sLw7F3LmTpoe8M77GrZOZHL6xQk=
どうやって
  • log_record_type
  • quiddity
  • ApexExecution
  • A
いつ timestamp_derived 2022-11-22T06:19:33.990Z