These slides give an introduction to the features App Insights provide. Also, it will present some tips and tricks you might find useful.
Size: 2.39 MB
Language: en
Added: Nov 11, 2021
Slides: 32 pages
Slide Content
Azure
Application
Insights
An introduction
Matthias Güntert –November 2021
Agenda
•What is Application Insights?
•What does it monitor?
•Investigation Tools
•Usage Analysis
•Tips & Tricks (optional)
About me
Personal
•Father of two kids
•Digital photographer
•Supermoto rider
•Blogger: www.azureblue.io
Professional
•Azure Cloud Enthusiast & Solution Architect
•Work for Solveva, a company focusing on software
solutions in the insurance sector
What does it monitor?
•Request rates, response times,
failure rates
•Dependency rates, response
times, failure rates
•Exceptions
•Page views, Load performance
•AJAX calls
•User and session counts
•Performance counters
•Host Diagnostics
•Diagnostic Trace Logs
•Custom events & metrics
Architecture for Demo
Application Maps
Triage Distributed Applications
•Visualize complex topologies
•Spot performancebottlenecks &
failurehotspots
•Across all components
•Component = Independently
deployable parts of
distributed/microservices
application
•Finds components by following
HTTP dependency calls made
between servers with App Insights
SDK installed
Smart Detection
Automatic notification of anomalies
•Proactive analysis of app
telemetry
•Automatically detects…
•degradations
•memory leaks
•abnormal rise in exception volume
•abnormal patterns in client or
server performance
•security anti-patterns
•No configuration required
•Get email notifications &
automated alerts
Live Metrics
Monitor & Diagnose with 1-second Latency
•See logs & metrics as they come in
•Displays data within seconds
•Metrics Explorer & Analytics requires
minutes
•Data is not getting stored & only
streamed while pane is open
•Free of charge
•Supports
•ASP.NET (Core), .NET (Core)
•Java
•Node.js
•Doesn’t support JavaScript!
Availability Tests
Monitor Availability & Responsiveness
•Sends web requests at regular
intervals
•Alerts if app isn’t responding
•Supports for types of tests
•URL Ping Test
•Standard Test
•Multi-Step Test
•Custom TrackAvailability()Test
Fourtypesoftests
AvailabilityTests
Test Type Description
URL Ping Test (Classic) •Simple GET requestfrom multiple regions
•Allowsto check responsebodyand code
•Createdvia portal
Standard Test (Preview) •Includes TLS certificatevalidationchecks
•Proactivelifetimecheck ofTLS certificate
•Supports morerequestverbs, GET, HEAD, POST, …
•Allowsto check responsebody
•Createdvia portal
Multi-StepWeb Test (Classic)•Play back a recordingofweb requestsequences
•Createdin Visual Studio Enterprise
Custom TrackAvailability()Test•Createdin code
Performance Profiler
•Providesperformancetraces
•Identify«hot» code pathtaking
thelongesttime
•Works with .NET applications
•App Service Basic servicetieror
higher
Enablevia: App Service > App Insights
User, Session & Event Reports
User Behavior Analytics
•Drive decisions about next development cycle based on usage & stats
•Three different perspectives
•Export to CSV, PowerBI, Excel (via log analytics)
•Split graphs by properties (refUri, browser version, OS, country, …)
Report Answers… Counting Method
User ReportHow many people used my app & features? Anonymous ID in browser cookie
Session ReportHow many sessions have included certain pages & features?A period of activity by a user, terminated by a period
of inactivity of half an hour
Event ReportHow often are certain pages & features used? On page load
Funnels
Monitor step-by-step conversion rate
•Are users processing through
an entire process?
•Track up to 6 custom events
•Create custom events with:
<button
onclick="appInsights.trackEvent({name:'a
dd-item-to-cart'});">Add item to
cart</button>
•Or use Click Analytics Plugin
<buttonid="add-item-to-cart“>Add item
to cart</button>
User Flows
Visualize& Analyze usernavigationpatterns
•Whatstepshave ledto an
exception?
•Whataretheplacesusers
churnmostfrom thesite?
•Whatdo usersclickon the
site?
Dependencies Pave Views Exceptions Custom Events Requests
Cohorts
Group yourusers
•A setofusers, sessions, eventsor
operationshavingsomethingin
common
•E.g. userswhousedappa certain
numberofdayswithina time window
•Similarto filters
•Can beused from
•Users
•Sessions
•Events
•User flow
App Insights REST API
Query & integrate with AI data
•Access all app events & metric
data via REST API
•Integrate your data e.g., with
PowerBI, Excel and others
•https://api.applicationinsights.io
•Configure > API Access > Create
API Key
•Application ID != Instrumentation
Key
Displaying Client IP Addresses
Tips & Tricks
•By default, only collected
temporarily for geolocation lookup
•IP calc. for client-side telemetry
occurs at the ingestion endpoint in
Azure
•Populated fields
•client_City = …
•client_StateOrProvince = …
•client_CountryOrRegion = …
•client_IP = 0.0.0.0
•Check your compliance
requirements first!
•Disable IP Masking via
•REST Call
•“DisableIpMasking”: true
•Custom Telemetry Initializer
azrest --method patch \
--urlhttps://management.azure.com/subscriptions/<sub -id>/resourceGroups/<rg -name>/providers/microsoft.insights/components/<resource -name>?api-version=2018-05-01-preview \
--body { \"location\": \"<resource location> \", \"kind\": \"web\", \"properties\": { \"Application_Type\": \"web\", \"DisableIpMasking\": true } }
Live Metrics -Securing control channel
Tips & Tricks
•Custom filters are sent back to
your app/SDK
•May contain confidential data
•Configure > API Access >
Create API key
ASP.NET Core: Startup.cs