Logs a call, records its duration in milliseconds, and writes an activity named for the member.
public sealed class ObservabilityBehavior(ILogger logger, Histogram<double> duration, ActivitySource? activities = null, ObservabilityRedaction? redact = null) : IStuntBehavior
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.
kind:method, kind:property, kind:ctor. Press Esc to clear.ObservabilityBehavior(ILogger, Histogram<Double>, ActivitySource?, ObservabilityRedaction?)Logs a call, records its duration in milliseconds, and writes an activity named for the member.ObservabilityBehavior(ILogger, Meter, ObservabilityRedaction?)Observes every call with logger and a histogram named stunts.invocation.duration (unit ms) on meter. Activities come from Source.SourceActivity source named Stunts.StuntInvocationEvent name StuntInvocation.AppliesTo(IMethodInvocation)Observes every invocation.Execute(IMethodInvocation, ExecuteHandler)Redacts arguments, starts an activity named for the member, and calls next once through Proceed. A synchronous exception is recorded and then propagates. An awaitable is returned immediately and observed when it settles.WithRedaction(ObservabilityRedaction)Returns a behavior that uses this instance's logger, histogram, and activity source with redact.