public InstrumentAttribute(string? name = null)Initializes a new InstrumentAttribute with an optional span name.
Parameters
name- Optional custom span name. Defaults to
TypeName.MethodName.
All Types / Ferrous
public sealed class InstrumentAttribute : Attribute
Marks a partial method for compile-time System.Diagnostics.Activity span instrumentation inspired by Rust's #[tracing::instrument]. The Ferrous.Unions source generator emits a System.Diagnostics.ActivitySource span wrapping a companion {MethodName}Core(...) implementation and automatically records non-skipped parameter values as activity tags.
public InstrumentAttribute(string? name = null)Initializes a new InstrumentAttribute with an optional span name.
nameTypeName.MethodName.public string? NameGets the optional custom span name.
public string? SourceNameGets or sets the optional ActivitySource name. Defaults to the containing type's full name.
public bool SkipParametersGets or sets a value indicating whether method parameters should be omitted from activity tags.