Logs a call, records its duration in milliseconds, and writes an activity named for the member.
public ObservabilityBehavior(ILogger logger, Histogram<double> duration, ActivitySource? activities = null, ObservabilityRedaction? redact = null)
Receives one event per settled call.
Duration histogram, in milliseconds. Create it with unit ms.
Activity source. Source is used when this is null.
Optional projection of arguments before they are logged or tagged.
Add this behavior first. The pipeline runs the first behavior outermost, so one activity and one duration cover every behavior added after it. The duration is Elapsed in milliseconds and includes the time until a returned or completes.