static ProbeContext BuildProbes(FeatureConfigurationContext context, MetricsOptions options) { var durationBuilders = new DurationProbeBuilder[] { new CriticalTimeProbeBuilder(context), new ProcessingTimeProbeBuilder(context) }; var performanceDiagnosticsBehavior = new ReceivePerformanceDiagnosticsBehavior(); context.Pipeline.Register( "NServiceBus.Metrics.ReceivePerformanceDiagnosticsBehavior", performanceDiagnosticsBehavior, "Provides various performance counters for receive statistics" ); var signalBuilders = new SignalProbeBuilder[] { new MessagePulledFromQueueProbeBuilder(performanceDiagnosticsBehavior), new MessageProcessingFailureProbeBuilder(performanceDiagnosticsBehavior), new MessageProcessingSuccessProbeBuilder(performanceDiagnosticsBehavior), new RetriesProbeBuilder(options) }; return(new ProbeContext( durationBuilders.Select(b => b.Build()).ToArray(), signalBuilders.Select(b => b.Build()).ToArray() )); }
/// <summary> /// See <see cref="Feature.Setup" />. /// </summary> protected internal override void Setup(FeatureConfigurationContext context) { var logicalAddress = context.Settings.LogicalAddress(); var performanceDiagnosticsBehavior = new ReceivePerformanceDiagnosticsBehavior(logicalAddress.EndpointInstance.Endpoint); context.Pipeline.Register(performanceDiagnosticsBehavior, "Provides various performance counters for receive statistics"); context.RegisterStartupTask(new WarmupCooldownTask(performanceDiagnosticsBehavior)); }
protected internal override void Setup(FeatureConfigurationContext context) { var logicalAddress = context.Settings.LogicalAddress(); var performanceDiagnosticsBehavior = new ReceivePerformanceDiagnosticsBehavior(logicalAddress.EndpointInstance.Endpoint); context.Pipeline.Register(performanceDiagnosticsBehavior, "Provides various performance counters for receive statistics"); context.Pipeline.Register("ProcessingStatistics", new ProcessingStatisticsBehavior(), "Collects timing for ProcessingStarted and adds the state to determine ProcessingEnded"); context.Pipeline.Register("AuditProcessingStatistics", new AuditProcessingStatisticsBehavior(), "Add ProcessingStarted and ProcessingEnded headers"); context.RegisterStartupTask(new WarmupCooldownTask(performanceDiagnosticsBehavior)); }
public MessagePulledFromQueueProbeBuilder(ReceivePerformanceDiagnosticsBehavior behavior) { this.behavior = behavior; }
public WarmupCooldownTask(ReceivePerformanceDiagnosticsBehavior behavior) { this.behavior = behavior; }
public MessageProcessingSuccessProbeBuilder(ReceivePerformanceDiagnosticsBehavior behavior) { this.behavior = behavior; }