Class ActivityProducerBehavior
- Namespace
- Silverback.Messaging.Diagnostics
- Assembly
- Silverback.Integration.dll
Starts an Activity and adds the tracing information to the message headers.
public class ActivityProducerBehavior : IProducerBehavior, IBrokerBehavior, ISorted
- Inheritance
-
ActivityProducerBehavior
- Implements
- Inherited Members
Constructors
ActivityProducerBehavior(IActivityEnricherFactory)
Initializes a new instance of the ActivityProducerBehavior class.
public ActivityProducerBehavior(IActivityEnricherFactory activityEnricherFactory)
Parameters
activityEnricherFactoryIActivityEnricherFactoryThe Factory to create the activity enrichers.
Properties
SortIndex
Gets the sort index.
public int SortIndex { get; }
Property Value
Methods
HandleAsync(ProducerPipelineContext, ProducerBehaviorHandler, CancellationToken)
Process, handles or transforms the message being produced.
public ValueTask HandleAsync(ProducerPipelineContext context, ProducerBehaviorHandler next, CancellationToken cancellationToken)
Parameters
contextProducerPipelineContextThe context that is passed along the behaviors pipeline.
nextProducerBehaviorHandlerThe next behavior in the pipeline.
cancellationTokenCancellationTokenThe cancellation token that can be used to cancel the operation.