Skip to content

Observability

You don't operate what you can't see. Structured logging, OpenTelemetry across logs/metrics/traces, distributed tracing (W3C TraceContext, Activity, the pitfalls of Activity.Current across Task.Run), exporters (OTLP / Prometheus / App Insights), and the full diagnostic toolbox.

Topics (canonical order)

  •   Structured Logging


    Microsoft.Extensions.Logging, [LoggerMessage] source-gen, Serilog, correlation IDs, log levels

  •   OpenTelemetry — Traces, Metrics, Logs


    The three pillars, ActivitySource and Meter, semantic conventions

  •   Distributed Tracing


    W3C TraceContext, baggage, Activity.Current pitfalls in Task.Run, span linking

  •   OTel Exporters


    OTLP (default), Prometheus scrape, Application Insights bridge, batch vs simple

  •   Diagnostics Tools


    dotnet-trace, dotnet-counters, dotnet-dump, !syncblk, PerfView, threadpool starvation diagnosis

  •   Sampling Strategies


    Head-based vs tail-based, parent-based, adaptive, OTEL Collector tail_sampling processor

  •   Logging at Scale


    Volume math, hot/warm/cold tiering, log shipping, sampling rules, cost dashboards

  •   OTEL Collector


    Agent vs gateway, processors (batch, memory_limiter, attributes, OTTL, tail_sampling), HA

  •   eBPF Observability


    Pixie, Cilium Tetragon, Parca; zero-app-change kernel-level tracing; .NET specifics

Why this order

Logging is the gateway drug; everyone has it. OTel is the modern unified replacement, so it follows. Distributed tracing is the most senior-relevant pillar because it's where async-correlation pitfalls bite. Exporters come next because choice depends on platform. Diagnostic tools close the section because they're the "now what?" when you suspect a problem.

Cross-references