Interview frequency: …
Short answer
Activity is .NET's built-in representation of a Span; OpenTelemetry collects request paths across services and propagates the standard traceparent header between servers.
Explanation
.NET has native Tracing support through System.Diagnostics.ActivitySource. When the OpenTelemetry SDK is enabled, it automatically traces HTTP requests, EF Core SQL queries, and MassTransit messages, propagating TraceId with W3C Trace Context headers so the full request journey appears in timeline dashboards such as Jaeger and Aspire Dashboard.
Code example
builder.Services.AddOpenTelemetry()
.WithTracing(tracing => tracing
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddEntityFrameworkCoreInstrumentation()
.AddOtlpExporter());Common mistakes
- Not propagating Tracing headers through background workers or Channels.
Follow-up questions
- What is .NET Aspire, and how does it simplify building and monitoring distributed Cloud-Native applications?
- What is the Dual-Write problem, and how does the Transactional Outbox pattern with MassTransit solve it?