2. Adding More Telemetry to Application Insights & Dashboards
Hi all;
I have a Blazor Interactive Server app using ASP.NET version 8. And using Entity Frameworks for accessing the DB and the ASP.NET Identity Library for users & claims.
I have Application Insights connected to the app via the AI SDK. I have the following configuration & extension questions to make better use of Application Insights & Dashboards. (Editorial comment - all of monitoring, metrics, application insights, etc. is really well designed and provides pretty much everything one could ask for.)
If anything I am asking to accomplish below is a bad idea, please just let me know it's a bad idea and then no need to answer the specifics for that question.
- How can I turn Application Insights on/off using an environment variable? I want it off on my desktop and sometimes off for the dev slot on Azure.
- Just as
builder.Logging.AddApplicationInsights()
sends all myIlogger
calls to Application Insights, is there a way to send my Health Checks (which I have working) to Application Insights/Dashboards? - Its not clear in all the documentation about what is classic Application Insights, what is Open Telemetry, and if they work together. Based on these steps for incorporating Application Insights I am using the classic Application Insights – correct?
- Can I use Open Telemetry also? Or should I stick with just Application Insights.
- When an exception occurs, do I want to call
TelemetryClient.TrackException(exception);
? If not, what do I call? - What do I add to my Blazor app so it will tell Application Insights every page loaded and how long each took? Blazor is a SPA.
- What do I add to my Blazor app so it will tell when each session starts/ends? Blazor server uses SignalR so the session is the start/end of the circuit.
- What do I add to my Blazor app so it tracks what user is doing what? My app uses the ASP.NET Identity Library for users (and claims).
- When the user calls search in my app I want to save the time, call my Search method, then log the elapsed time to Application Insights. How do I do this?
thanks - dave