Why App Insights Matters
Most platform metrics & logs only get you down to the host, container, or connection level.
Application Insights takes you deeper:
- In code performance
- Custom events
- End-to-end distributed traces
- Real user monitoring (RUM)
This is the layer where Dev meets Ops true full-stack observability.
Connecting App Insights into the Pipeline
Two options
- Autoinstrumentation via App Service, .NET, Java
- Manual SDK init for custom apps (Node.js, Python, etc.)
Once wired in, App Insights connects into Azure Monitor:
- Sends logs to Log Analytics
- Shows in Application Map
- Correlates to trace IDs and transaction flows
Portal Walkthrough: App Insights
- Go to Application Insights (create if needed)
- In your App Service:
- Monitoring → Application Insights
- Link to existing or create new
- View the Application Map
- Check:
- Server Response Time
- Dependencies
- Failures
- Exceptions (with stack trace!)
- Request Drilldown
Querying App Insights via KQL
|
|
|
|
Use Case: Performance Bottleneck in Web App
- Alert fires: increase in 5xx HTTP
- Jump into App Insights → Trace affected request
- View context:
- Which dependency failed?
- Which method threw?
- Which DB call took longest?
You’ll also see correlation IDs that link back to activity in Log Analytics.
Bicep: Connect App Insights to App Service
|
|
Gotchas
- Sampling enabled by default – can miss some traces (adjust if needed)
- Cold starts in Functions skew performance data
- Not everything emits by default—opt into custom events where needed
Best Practices
- Use App Map to visualise distributed transactions
- Always include custom dimensions in telemetry to enrich logs by env, tenant, user ID
- Export logs to Log Analytics Workspace for unified querying
- Test lifecycle: App Insights can detect startup times and deployment regressions
- Use end-to-end Transaction Search it’s underrated gold
Brewed Insight: You don’t need to instrument everything but you should instrument what matters. Application Insights is the difference between “The app is slow” and “That SQL query in Line 43 is the problem.”