Tracing, logging, and metrics from a single interface
You want OpenTelemetry activities, structured logs, and metrics around an order service, but you do not want to hand-write the ActivitySource, ILogger, and Meter wiring in every class.
[ActivitySource]
[Logger]
[Meter]
public interface IOrderServiceTelemetry
{
[Activity]
[Info]
[AutoCounter]
Activity? PlacingOrder(int orderId, [Baggage] string region);
} What you get: The generator emits the implementation and an AddOrderServiceTelemetry() DI extension; you register it once and inject the interface wherever telemetry is needed.
One interface replaces the ActivitySource, ILogger, and Meter boilerplate you would otherwise repeat in every service.