---
title: "パイプライントレーシング"
slug: "pipeline-tracing-559544"
abstract: "パイプライントレーシングを有効にしてパフォーマンスを監視したりトラブルシューティングしたりする方法。"
---
# パイプライントレーシング

パイプラインフレームワークはトレース機能を提供します。パイプライントレーシングは、特定の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に設定し、パラメータLogLevelDebugに設定してください。
    
    以下はパイプライントレーシングが有効なログ設定の例です。
    
    ...
    
    "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 :