/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dimensions">Aggregation Dimension bag for EventhubReceiverMonitor</param>
 /// <param name="telemetryProducer"></param>
 public DefaultEventHubReceiverMonitor(EventHubReceiverMonitorDimensions dimensions, ITelemetryProducer telemetryProducer)
     : base(telemetryProducer)
 {
     this.LogProperties = new Dictionary <string, string>
     {
         { "Path", dimensions.EventHubPath },
         { "Partition", dimensions.EventHubPartition }
     };
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="dimensions">Aggregation Dimension bag for EventhubReceiverMonitor</param>
 /// <param name="logger"></param>
 public DefaultEventHubReceiverMonitor(EventHubReceiverMonitorDimensions dimensions, Logger logger)
 {
     this.logger   = logger;
     logProperties = new Dictionary <string, string>
     {
         { "Path", dimensions.EventHubPath },
         { "Partition", dimensions.EventHubPartition }
     };
 }
예제 #3
0
        private EventHubAdapterReceiver MakeReceiver(QueueId queueId)
        {
            var config = new EventHubPartitionSettings
            {
                Hub       = hubSettings,
                Partition = this.streamQueueMapper.QueueToPartition(queueId),
            };

            var receiverMonitorDimensions = new EventHubReceiverMonitorDimensions
            {
                EventHubPartition = config.Partition,
                EventHubPath      = config.Hub.Path,
            };

            return(new EventHubAdapterReceiver(config, this.CacheFactory, this.CheckpointerFactory, this.loggerFactory, this.ReceiverMonitorFactory(receiverMonitorDimensions, this.loggerFactory, this.telemetryProducer),
                                               this.serviceProvider.GetRequiredService <IOptions <LoadSheddingOptions> >().Value,
                                               this.telemetryProducer,
                                               this.EventHubReceiverFactory));
        }
예제 #4
0
        private EventHubAdapterReceiver MakeReceiver(QueueId queueId)
        {
            var config = new EventHubPartitionSettings
            {
                Hub       = hubSettings,
                Partition = streamQueueMapper.QueueToPartition(queueId),
            };
            Logger recieverLogger = logger.GetSubLogger($"{config.Partition}");

            var receiverMonitorDimensions = new EventHubReceiverMonitorDimensions();

            receiverMonitorDimensions.EventHubPartition = config.Partition;
            receiverMonitorDimensions.EventHubPath      = config.Hub.Path;
            receiverMonitorDimensions.NodeConfig        = this.serviceProvider.GetRequiredService <NodeConfiguration>();
            receiverMonitorDimensions.GlobalConfig      = this.serviceProvider.GetRequiredService <GlobalConfiguration>();

            return(new EventHubAdapterReceiver(config, CacheFactory, CheckpointerFactory, recieverLogger, ReceiverMonitorFactory(receiverMonitorDimensions, recieverLogger),
                                               this.serviceProvider.GetRequiredService <Func <NodeConfiguration> >(),
                                               this.EventHubReceiverFactory));
        }