Property Enrich
Enrich
Gets or sets an action to enrich an Activity.
public Action<Activity, NatsInstrumentationContext>? Enrich { get; set; }
Property Value
Remarks
An exception thrown here is caught and ignored; the activity keeps whatever the callback managed to set before it threw.
The activity is also Current for the duration of the callback, on the receive path as well as the send path. Receive activities are created on the connection's read loop and are kept off the ambient context otherwise, so the receive path makes the activity current for the call and puts the read loop's context back afterwards.