I would like to log the "Event URL" field in Kentico Portal logs to Azure Application Insights for 404 requests. 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.
We already have this as a recommendation on the GitHub - use RawUrl
instead of Request.Url
.
As explained here RawUrl better suites cases when the request was redirected to the custom error page: Request.RawUrl vs. Request.Url
Please upvote the issue on 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
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.