1. 拡張xConnectログ

HTTPリクエストログの設定

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

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

拡張されたxConnectログは、xConnectへのHTTPリクエストやレスポンスを追跡できます。これはデフォルトで無効化されています。

HTTPリクエストログングを有効にする

HTTPリクエストログを有効にするには:

  • ファイル名を\App_Data\Config\Sitecore\CoreServices\sc.XConnect.RequestLogging.Web.Host.xmlに変えて\App_Data\Config\Sitecore\CoreServices\sc.XConnect.RequestLogging.Web.Host.xml.disabledを有効にしてください。

HTTPリクエストログの出力例

ログ出力にはリクエスト(メソッド、URI、HTTPヘッダー、リクエスト内容)とレスポンス(URI、ステータスコード、HTTPヘッダー、コンテンツ)が含まれます。リクエストとレスポンスをIdフィールドでマッチさせることができます。

2021-06-03 `14

`
.167 +`03
` Verbose Sending HTTP request Http trace { "Id": 13621, "HttpMethod": { "Method": "POST" }, "Uri": "https://xcp\_xconnect/odata/Contacts(44f965ad-28dd-4095-91b6-69e77e696daa)/Interactions", "HeadersInfo": { "Key": "Host", "Value": "xcp_xconnect"

}, { "Key": "OData-Version", "Value": "4.0"

}, { "Key": "Accept", "Value": "application/json; odata.metadata.context=false"

}, { "Key": "Content-Type", "Value": "application/json; charset=utf-8; odata.metadata.context=false"

}, { "Key": "Content-Length", "Value": "643"

} , "Content": "{\"ChannelId\":\"7886e1f5-b85c-484b-bfee-0cb3678dbf0a\",\"StartDateTime\":\"2021-06-03T11:`49

`.5869922Z\",\"EndDateTime\":\"2021-06-03T11:`49
`.5869922Z\",\"Duration\":\"PT30S\",\"Events\":{\"@odata.type\":\"#Sitecore.XConnect.Collection.Model.PageViewEvent\",\"CustomValues\":,\"DefinitionId\":\"9326cb1e-cec8-48f2-9a3e-91c7dbb2166c\",\"ItemId\":\"110d559f-dea5-42ea-9c1c-8a5df7e70ef9\",\"Id\":\"e61bcbad-e464-4e60-afce-0c7004fd20c0\",\"Text\":\"Parent Event: 9326cb1ecec848f29a3e91c7dbb2166c\",\"Timestamp\":\"2021-06-03T11:`49
`.5869922Z\",\"Duration\":\"PT30S\",\"ItemLanguage\":\"ja-JP\",\"ItemVersion\"
},\"UserAgent\":\"abc4f918-b686-4e1e-9c2e-dfa4cbfd1a69\",\"Contact\":{\"@odata.id\":\"$2\"}}" }

2021-06-03 `14

`
.167 +`03
` Verbose Received HTTP response Http trace { "Id": 13621, "Uri": "https://xcp\_xconnect/odata/Contacts(44f965ad-28dd-4095-91b6-69e77e696daa)/Interactions", "StatusCode": 200, "Duration": "`00
`
.0002137", "HeadersInfo": { "Key": "Content-Type", "Value": "application/json"

} , "Content": null }

HTTPリクエストログのログ詳細を変更する

HTTPリクエストログのログ詳細を変更することは可能です。以下のいずれかの値を選択できます:

  • OnlyRequest(リクエストとレスポンスをヘッダーや内容なしでログに記録します)。

    2021-06-03 `17

    `
    .456 +`03
    ` Verbose Sending HTTP request Http trace { "Id": 4, "HttpMethod": { "Method": "GET" }, "Uri": "https://xcp\_xconnect:443/odata/Contacts?%24filter=Id+eq+4b1e26d2-7988-0000-0000-062609cf16cb&%24expand=Identifiers,MergeInfo,ConsentInformation", "HeadersInfo": null, "Content": null }

    2021-06-03 `17

    `
    .460 +`03
    ` Verbose Received HTTP response Http trace { "Id": 4, "Uri": "https://xcp\_xconnect:443/odata/Contacts?%24filter=Id+eq+4b1e26d2-7988-0000-0000-062609cf16cb&%24expand=Identifiers,MergeInfo,ConsentInformation", "StatusCode": 200, "Duration": "`00
    `
    .0036468", "HeadersInfo": null, "Content": null }

  • RequestWithHeaders(リクエストおよびレスポンスヘッダーは内容情報なしでログに記録します)。

    2021-06-03 `17

    `
    .475 +`03
    ` Verbose Sending HTTP request Http trace { "Id": 4, "HttpMethod": { "Method": "GET" }, "Uri": "https://xcp\_xconnect:443/odata/Contacts?%24filter=Id+eq+8a167bdf-922c-0000-0000-062609e1e7c7&%24expand=Identifiers,MergeInfo,ConsentInformation", "HeadersInfo": { "Key": "Accept", "Value": "application/json; odata.metadata.context=false"

    }, { "Key": "Host", "Value": "xcp_xconnect"

    }, { "Key": "OData-Version", "Value": "4.0"

    } , "Content": null }

    2021-06-03 `17

    `
    .480 +`03
    ` Verbose Received HTTP response Http trace { "Id": 4, "Uri": "https://xcp\_xconnect:443/odata/Contacts?%24filter=Id+eq+8a167bdf-922c-0000-0000-062609e1e7c7&%24expand=Identifiers,MergeInfo,ConsentInformation", "StatusCode": 200, "Duration": "`00
    `
    .0043318", "HeadersInfo": { "Key": "Content-Type", "Value": "application/json"

    } , "Content": null }

  • Full(リクエストとレスポンスのすべての情報をログに記録します)。

HTTPリクエストログの詳細はデフォルトでFullに設定されています。

ログの詳細を変更するには:

  • 設定ファイルを開いて\App_Data\Config\Sitecore\CoreServices\sc.XConnect.RequestLogging.Web.Host.xmlSettings/Sitecore/XConnect/Services/HttpRequestLoggingConfiguration/Options/HttpRequestAndResponseLogLevelノードの値を変更してください。

    Full
この記事を改善するための提案がある場合は、 お知らせください!