Table of Contents

Property Enrich

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

Enrich

Gets or sets an action to enrich an Activity.

public Action<Activity, NatsInstrumentationContext>? Enrich { get; set; }

Property Value

Action<Activity, NatsInstrumentationContext>

Remarks

An exception thrown here is caught and ignored; the activity keeps whatever the callback managed to set before it threw.

Use the Activity argument rather than Current. On the send path the new activity is current, but on the receive path it is not: receive activities are created on the connection's read loop and are deliberately kept off the ambient context.