Reputation: 169
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.
Upvotes: 0
Views: 168
Reputation: 343
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
.
Upvotes: 1