パイプラインのトレース

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

パイプラインフレームワークは、トレース機能を提供します。パイプライン トレースを使用すると、Commerce Engineの特定のインスタンスで実行されている個々のカスタムまたは既定のCommerceパイプラインとブロックのパフォーマンスを監視またはトラブルシューティングできます。パイプライン トレースを有効にすると、トレース データがCommerce Engineノード ログに保存されます。ログファイルには、C:\inetpub\wwwroot\<CommerceShops_Sc9>\wwwroot\logs\<SCF.<YYYYMMDD>.log.<NODEGUID>.txt .

パイプライントレースを有効にする

パイプライン トレースは、既定では無効になっています。

パイプライン トレースを有効にするには:

  1. パイプラインをトレースする実行中のCommerce Engineサービスのconfig.jsonファイルを開きます。たとえば、C:\inetpub\wwwroot\<CommerceShops_Sc9>\wwwroot\config.json.

  2. パイプライン トレースを有効にするには、"PipelineTraceLoggingEnabled"trueに設定し、LogLevelパラメーターをDebugに設定します。

    次に、パイプライントレースを有効にしたログ設定の例を示します。

    ...
    
    "Logging": {
            "IncludeScopes": false,
            "LogLevel": {
                "Default": "Debug",
                "System": "Debug",
                "Microsoft": "Debug"
            },
            "ApplicationInsightsLoggingEnabled": false,
            "PipelineTraceLoggingEnabled": true,
            "SerilogLoggingEnabled": true
        },
    "Serilog": {   
            "Using": [          
                "Serilog.Sinks.Literate",
                "Serilog.Sinks.File"
            ],     
            "MinimumLevel": {          
                "Default": "Debug",           
                "Override": {               
                    "Microsoft": "Debug",              
                    "System": "Debug"
                }
            },      
            "FileSizeLimitBytes": 100000000
        },
  3. トレース・ログ・ファイルを表示するには、C:\inetpub\wwwroot\<CommerceShops_Sc9>\wwwroot\logs\<SCF.<YYYYMMDD>.log.<NODEGUID>.txtでログ・ファイルを開きます。

メモ

パイプライン トレースを無効にするには、"PipelineTraceLoggingEnabled"falseに設定します。

パイプライン トレース ログの例

パイプライン トレースは、実行中のパイプラインとそれが実行するブロックに関する開始時刻と終了時刻の情報を収集します。パイプライン トレース ログの出力例を次に示します。

0024 11:23:08 DEBUG [PipelineStarted]

00024 11:23:08 DEBUG Block execution started for '"EntityVersions.block.SetEntityVersion"'

00024 11:23:08 DEBUG Block execution completed for '"EntityVersions.block.SetEntityVersion"'

00024 11:23:08 DEBUG Block execution started for '"Carts.Block.EnsureCartEntityUniqueId"'

00024 11:23:08 DEBUG Block execution completed for '"Carts.Block.EnsureCartEntityUniqueId"'

00024 11:23:08 DEBUG Block execution started for '"Core.block.EnsureEntityUniqueId"'

00024 11:23:08 DEBUG Block execution completed for '"Core.block.EnsureEntityUniqueId"'

00024 11:23:08 DEBUG Block execution started for '"Core.block.LoadVersioningEntity"'

00024 11:23:08 DEBUG Block execution completed for '"Core.block.LoadVersioningEntity"'

00024 11:23:08 DEBUG Block execution started for '"Customers.blocks.FindEntity"'

00024 11:23:08 DEBUG Block execution completed for '"Customers.blocks.FindEntity"'

00024 11:23:08 DEBUG Block execution started for '"Core.block.FindEntityInCache"'

00024 11:23:08 DEBUG Block execution completed for '"Core.block.FindEntityInCache"'

00024 11:23:08 DEBUG Block execution started for '"SQL:block:FindEntity"'

00024 11:23:08 DEBUG SQL.FindEntity.PolicySet: EntityId=Entity-PolicySet-CatalogPolicySet

00024 11:23:08 DEBUG Sharding policy for 'Entity-PolicySet-CatalogPolicySet', was not found.

00022 11:23:08 DEBUG Block execution completed for '"SQL:block:FindEntity"'

00022 11:23:08 DEBUG Block execution started for '"Core.block.CheckNegativeCache"'

00022 11:23:08 DEBUG Block execution completed for '"Core.block.CheckNegativeCache"'

00022 11:23:08 DEBUG Block execution started for '"Core.block.SetNegativeCache"'

00022 11:23:08 DEBUG Block execution completed for '"Core.block.SetNegativeCache"'

00022 11:23:08 DEBUG Block execution started for '"Core.block.DeserializeEntity"'

00022 11:23:08 DEBUG Block execution completed for '"Core.block.DeserializeEntity"'

00022 11:23:08 DEBUG Block execution started for '"Content.Block.EnsureContentItemChildren"'

00022 11:23:08 DEBUG Block execution completed for '"Content.Block.EnsureContentItemChildren"'

00022 11:23:08 DEBUG Block execution started for '"Core.block.SetEntityInCache"'

00022 11:23:08 DEBUG Block execution completed for '"Core.block.SetEntityInCache"'

00022 11:23:08 DEBUG Block execution started for '"Core.block.LoadEntityLocalizedValues"'

00022 11:23:08 DEBUG Block execution completed for '"Core.block.LoadEntityLocalizedValues"'

00022 11:23:08 DEBUG Block execution started for '"Core.block.CreateVersioningEntity"'

00022 11:23:08 DEBUG Block execution completed for '"Core.block.CreateVersioningEntity"'

00022 11:23:08 DEBUG [PipelineCompleted]

00022 11:23:08 DEBUG +-[ Pipeline Trace Output ]--------------------

00022 11:23:08 DEBUG |

00022 11:23:08 DEBUG |   +[Pipeline] - 00:00:00.0116291 : Core.pipeline.findentity

00022 11:23:08 DEBUG |      [00.85%] - 00:00:00.0000986 : Core.block.FindEntityInCache

00022 11:23:08 DEBUG |      [01.07%] - 00:00:00.0001247 : Customers.blocks.FindEntity

00022 11:23:08 DEBUG |      [00.75%] - 00:00:00.0000872 : Core.block.LoadVersioningEntity

00022 11:23:08 DEBUG |      [00.92%] - 00:00:00.0001065 : Core.block.EnsureEntityUniqueId

00022 11:23:08 DEBUG |      [00.64%] - 00:00:00.0000746 : Carts.Block.EnsureCartEntityUniqueId

00022 11:23:08 DEBUG |      [00.95%] - 00:00:00.0001101 : EntityVersions.block.SetEntityVersion

00022 11:23:08 DEBUG |      [88.81%] - 00:00:00.0103276 : SQL:block:FindEntity

00022 11:23:08 DEBUG |      [00.57%] - 00:00:00.0000667 : Core.block.CreateVersioningEntity00022 11:23:08 DEBUG |      [00.54%] - 00:00:00.0000623 :
この記事を改善するための提案がある場合は、 お知らせください!