[英]How to log the Event URL field in Kentico for 404 pages in Azure Application Inisghts?
I would like to log the "Event URL" field in Kentico Portal logs to Azure Application Insights for 404 requests. 我想将Kentico Portal日志中的“事件URL”字段记录到404请求的Azure Application Insights中。 Since I changed my custom page for 404 errors in Kentico Portal I only get "PortalTemplate.apsx" for the url field in the requests table in AppInsights.
由于我在Kentico Portal中将自定义页面更改为404错误,因此我在AppInsights的请求表中仅获得URL字段的“ PortalTemplate.apsx”。
We already have this as a recommendation on the GitHub - use RawUrl
instead of Request.Url
. 我们已经在GitHub上将此作为推荐 -使用
RawUrl
而不是Request.Url
。
As explained here RawUrl better suites cases when the request was redirected to the custom error page: Request.RawUrl vs. Request.Url 如此处所述,当请求重定向到自定义错误页面时,RawUrl可提供更好的解决方案: Request.RawUrl与Request.Url
Please upvote the issue on GitHub. 请在GitHub上解决该问题。 As a workaround now you can replace OperationNameTelemetryInitializer in
ApplicaitonInsights.config
to your own implementation of it that uses RawUrl
instead of the Url
. 作为一种变通方法,现在你可以替换OperationNameTelemetryInitializer在
ApplicaitonInsights.config
自己的实现它使用RawUrl
代替的Url
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.