-
Notifications
You must be signed in to change notification settings - Fork 0
3. Monitoring and Logging
Related code changes can be found here
See Code Changes
Temporary code required to simulate exceptions or add additional logging is not included.
-
The bicep script nows provisions an Application Insights resource and sets up the PublicApi Web App to connect to it.
Application Insights SDK has been integrated into PublicApi project. -
CatalogItemListPagedEndpoint
logs the number of matching catalog items using Information Log Level.
The log entry can be found in Application Insights with the following query.
traces
| where customDimensions.CategoryName == "Microsoft.eShopWeb.PublicApi.CatalogItemEndpoints.CatalogItemListPagedEndpoint"
| where timestamp >= ago(1h)
-
Examine the number of requests and CPU metrics in App Service
-
Simulate an exception in
CatalogItemListPagedEndpoint.HandleAsync
with message 'Cannot move further'. After calling the endpoint, number of matching exceptions can be found by executing the following Kusto Query
exceptions
| where timestamp > ago(1h)
| where outerMessage == 'Cannot move further'
| summarize count()
Exception's stack trace is visible in the Failures tab
Modified Program.cs to throw an exception on line 32. After deploying the changes the application fails to start as expected. The exception is visible in Diagnose and solve problems | Application Logs
Application Insight resource Bicep definition
Log Analytics Workspace used by sk-appi-dev
Bicep definition
Resource connected with Application Insights sk-appi-dev
Bicep definition
All resources were deleted afterwards