STRUCTURED COURSE

Serilog, Logging and OpenTelemetry for ASP.NET Core Observability

Learn how to build professional logging and observability infrastructure in ASP.NET Core applications. Apply Serilog, structured logging, log levels, correlation IDs, OpenTelemetry, tracing, and metrics through real-world project examples.

12 lessons 600 dk Serilog / OpenTelemetry / OTLP / Jaeger / Grafana / Seq
Serilog, Logging and OpenTelemetry for ASP.NET Core Observability

In this course series, we will build a professional logging and observability infrastructure for ASP.NET Core applications using a real-world project. We will start with ILogger and Serilog, then cover structured logging, log levels, sinks, file and centralized logging, correlation IDs, request logging, and exception logging. We will then introduce OpenTelemetry concepts such as tracing, metrics, and distributed tracing to understand how requests flow across services. The goal is not only to produce logs, but to build an observability system that helps diagnose errors, performance bottlenecks, and application behavior in production environments.

What you will learn

Use ILogger and Serilog, implement structured logging, choose appropriate log levels, configure sinks and log destinations, track requests using correlation IDs, implement request logging, integrate OpenTelemetry, create traces and metrics, understand distributed tracing, and analyze errors and performance issues in production environments.
CURRICULUM

Course lessons

12 lessons
  1. 11. Project Architecture and ASP.NET Core Logging FundamentalsIn this lesson, we will build the .NET 10 Web API used throughout the course, examine DI lifetimes, and produce our first logs with ILogger.45 dk
  2. 22. Serilog Integration and ConfigurationIn this lesson, you will add Serilog.AspNetCore to an existing ASP.NET Core project, replace the default logging provider, and manage log levels across environments through configuration files.45 dk
  3. 33. Structured Logging and Log Design StandardsApply message templates, named properties, destructuring, and event properties to an order and payment workflow while designing searchable and secure log events.45 dk
  4. 44. Sinks: Console, File, and Rolling FileConfigure Serilog console, file, and rolling file destinations with JSON formatting, size limits, retention, rotation, and environment-specific settings.50 dk
  5. 55. Centralized Logging: Seq and the OTLP Log ApproachSet up Seq with Docker Compose, send Serilog events to a centralized destination, filter properties, investigate errors, use dashboards, and configure sinks securely.75 dk
  6. 66. Request Logging and the HTTP Request LifecycleLearn how to record HTTP requests as single Serilog events, filter health and noisy endpoints, add custom request enrichment, and test middleware ordering.45 dk
  7. 77. Correlation ID, Trace ID, and Log ContextBuild middleware that accepts or generates an X-Correlation-ID and propagates it to response headers, Serilog LogContext, and downstream HttpClient calls. Explore the relationship between correlation, trace, and span identifiers.45 dk
  8. 88. Exception Logging and Global Error HandlingBuild safe, traceable, and structured global error handling with ProblemDetails while separating expected business-rule failures from unexpected application exceptions.50 dk
  9. 99. OpenTelemetry Fundamentals and ASP.NET Core TracingLearn OpenTelemetry architecture, Activity and Resource concepts, and automatic span generation for ASP.NET Core and HttpClient calls.45 dk
  10. 1010. Manual Instrumentation: ActivitySource and Custom SpansAdd custom spans for order, payment, and inventory workflows with ActivitySource and Activity; learn practical design for attributes, events, status, exceptions, and nested spans.45 dk
  11. 1111. OpenTelemetry Metrics and Application MeasurementsCreate application metrics with Meter, Counter, Histogram, and Observable Gauge, combine them with ASP.NET Core and runtime metrics, and export them through OTLP.35 dk
  12. 1212. Production Observability with the OTLP Collector, Jaeger, and GrafanaConnect OpenTelemetry Collector, Jaeger, Grafana, Prometheus, and Seq with Docker Compose and investigate traces, metrics, and logs end to end.75 dk
Start the first lesson