Logging and Monitoring in ASP.NET Core
Good logging and monitoring is critical to enable support for your web applications. This course will teach you how to create helpful log entries, write them to places to support analysis, and use logs and health checks to monitor your application.
What you'll learn
Identifying issues in your web applications before your customers experience them is a key capability in modern web apps. In this course, Logging and Monitoring in ASP.NET Core, you’ll learn to create useful log entries and enable monitoring in your web application. First, you’ll explore the basics of getting log entries created, including information in them, and standard entries like exceptions and HTTP request information. Next, you’ll discover how to write those entries to places that leverage the value in the log entries you’ve created. Finally, you’ll learn how to set up monitoring in your application using health checks along with your log entries. When you’re finished with this course, you’ll have the skills and knowledge of logging and monitoring needed to enable simple ongoing support of your application.
Table of contents
- Introduction 1m
- Intentions of Application Logging 3m
- Log Levels Defined 2m
- Demo: Using Log Levels 6m
- Categories Defined 1m
- Demo: Custom Log Category 3m
- Log Filters Defined 2m
- Demo: Using Filters 5m
- Demo: Filtering Based on Provider 4m
- Demo: Applying Filters in Code 2m
- Summary 1m
- Checkpoint 03 - Using Log Levels 0m
- Checkpoint 04 - Custom Log Category 0m
- Introduction 2m
- Application Updates and Problem Statement 7m
- Exception Handling 4m
- Demo: Using the Error Page in a User Interface 5m
- API Error Handling 2m
- Demo: Improving API Error Handling by Using ProblemDetails 6m
- Demo: Logging Critical Exceptions with Middleware 3m
- Demo: Reading API Errors in a User Interface 3m
- Request Logging 2m
- Demo: Using HTTP and W3C Logging 4m
- Summary 1m
- Checkpoint 05 - Update Existing Error Page 0m
- Checkpoint 08 - Reading API Errors in a User Interface 0m
- Checkpoint 07 - Critical Exception Middleware 0m
- Checkpoint 06 - Improve API Error Handling 0m
- Introduction 2m
- Log Method Arguments 4m
- Demo: Add User Information to Log Entries (UI) 6m
- Demo: Add EventId and User Information to Log Entries (API) 5m
- Semantic Logging 1m
- Log Scopes 1m
- Demo: Scopes with Semantic Log Entries 4m
- Demo: Adding a Scope in Middleware for User Information 3m
- Hiding Sensitive Information 1m
- Demo: Dealing with Sensitive Information 3m
- Demo: Using LoggerMessage Source Generators 5m
- Summary 1m
- Checkpoint 10 - Log Scopes 0m
- Checkpoint 12 - .Net LoggerMessage 0m
- Checkpoint 09 - Add Information to Logs 0m
- Checkpoint 11 - Dealing with Sensitive Data 0m
- Introduction 2m
- Logging Providers 1m
- Demo: Using Specific Providers 3m
- Semantic Logging and Destination Options 4m
- Demo: Using Application Insights as a Destination 7m
- Demo: Using the Serilog Framework with Seq 6m
- Demo: Using the NLog Framework with Splunk 6m
- Factors When Choosing a Destination 2m
- Summary 1m
- Checkpoint 13 - Using Specific Providers 0m
- Introduction 2m
- Defining Monitoring and APM 3m
- Demo: Query-based Alerts with Seq 3m
- Demo: Query-based Alerts with Application Insights 4m
- Query-based Monitoring Examples 2m
- Defining Health Checks 2m
- Demo: Simple Health Check for the UI 2m
- Demo: Adding a DbContext Health Check to the API 2m
- Demo: Custom Health Checks and Checking the Authentication Service 4m
- Demo: Monitoring Health Check Endpoints 6m
- Demo: Controlling Log Entries for Health Checks 2m
- Liveness and Readiness Checks, and More on Health Checks 3m
- Summary and What's Next 2m
- Checkpoint 15 - Adding DbContext Health Check 0m
- Checkpoint 16 - Custom Health Checks 0m
- Checkpoint 14 - Health Checks 0m
- Introduction 2m
- Traceability Defined 2m
- Activity Tracking Fields and Format 3m
- Demo: Understanding Activity Tracking Fields 5m
- The Intent of Traceability 1m
- Demo: Traceability within Application Insights 3m
- Introducing OpenTelemetry 2m
- Demo: Adding OpenTelemetry to Projects and Viewing in Jaeger 7m
- Key Points with Traceability 1m
- Closing Thoughts 3m