-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Db Validation is not Azure App Insights friendly #14314
Comments
Do you mean this is an exception during setup of a tenant, right? Because in Application Insights while that shows up in Live metrics for some reason, it's not actually logged (it shouldn't, it's caught). |
@Piedone It shows up as a Dependency failure when you look at Requests or if you go look into the Failures / Dependency view |
Indeed, you're correct. What I remembered is that they don't cause request failures. |
Is there a way to create faulty SQL queries, and mark them as expected in App Insight? |
These can be filtered out with a telemetry processor, see here. I've created an issue for our AI module: Lombiq/Orchard-Azure-Application-Insights#68 I don't think this is a bug in Orchard but rather a peculiarity of collecting telemetry with AI. |
Yeah, we've tried this for the other "already an object named Identifiers in the database" but I wasn't happy with the end result. I'll take another look to see if I can solve both at the same time. |
We've done it in our module here: Lombiq/Orchard-Azure-Application-Insights#69. |
Better than excluding such telemetry fully is to mark it as a success, see: https://learn.microsoft.com/en-us/azure/azure-monitor/app/api-filtering-sampling?tabs=javascriptwebsdkloaderscript#addmodify-properties-itelemetryinitializer. So we've added a feature for doing this in general to our module: https://github.com/Lombiq/Orchard-Azure-Application-Insights/blob/dev/Lombiq.Hosting.Azure.ApplicationInsights/ApplicationInsightsOptions.cs#L82 |
Since updating to 1.5 we have started seeing dependency failures in App Insights when we provision new clients with the following exception "Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Document'."
I've traced this to the the Db validation step executing a select TOP against this table which does not yet exist.
It would be nice if OC could work without extraneous failures being logged in external telemetry systems as I suspect other systems like App Dynamics and what have you will also detect the same failure.
The text was updated successfully, but these errors were encountered: