如何在 Azure Application Inisghts 的 404 页面中记录 Kentico 中的事件 URL 字段?
How to log the Event URL field in Kentico for 404 pages in Azure Application Inisghts?
我想将 Kentico 门户日志中的 "Event URL" 字段记录到 Azure Application Insights 以获取 404 请求。由于我在 Kentico Portal 中针对 404 错误更改了我的自定义页面,因此我在 AppInsights 中的请求 table 中的 url 字段中只得到 "PortalTemplate.apsx"。
我们已经将其作为 recommendation on the GitHub - 使用 RawUrl
而不是 Request.Url
。
如此处所述,当请求重定向到自定义错误页面时,RawUrl 更适用于以下情况:Request.RawUrl vs. Request.Url
请在 GitHub 上对该问题进行投票。作为解决方法,现在您可以将 ApplicaitonInsights.config
中的 OperationNameTelemetryInitializer 替换为您自己的使用 RawUrl
而不是 Url
.
的实现
我想将 Kentico 门户日志中的 "Event URL" 字段记录到 Azure Application Insights 以获取 404 请求。由于我在 Kentico Portal 中针对 404 错误更改了我的自定义页面,因此我在 AppInsights 中的请求 table 中的 url 字段中只得到 "PortalTemplate.apsx"。
我们已经将其作为 recommendation on the GitHub - 使用 RawUrl
而不是 Request.Url
。
如此处所述,当请求重定向到自定义错误页面时,RawUrl 更适用于以下情况:Request.RawUrl vs. Request.Url
请在 GitHub 上对该问题进行投票。作为解决方法,现在您可以将 ApplicaitonInsights.config
中的 OperationNameTelemetryInitializer 替换为您自己的使用 RawUrl
而不是 Url
.