public EventsAggregator(IMetricsReporter metricsReporter,
                         IExceptionLogger exceptionLogger)
 {
     _metricsReporter = metricsReporter;
     _exceptionLogger = exceptionLogger;
     _subscriptions   = new List <IEventSubscription>();
 }
Exemplo n.º 2
0
 public MoranbernateStorage(ISqlConnectionFactory connectionFactory,
                            IPerfLogger <T> perfLogger,
                            IMetricsReporter metricsReporter)
 {
     _perfLogger         = perfLogger;
     _metricsReporter    = metricsReporter;
     _connectionProvider = connectionFactory.GetConnectionProvider <T>();
 }
Exemplo n.º 3
0
 public TelemetryReporterInfluxAttribute()
 {
     IMetricsReporterBuilder builder = new MetricsReporterBuilder(
          _activationFactory,
          _simpleConfig,
          _tagContext);
     _reporter = builder.Build();
 }
Exemplo n.º 4
0
 public AggregatedQueryRunner(ISqlConnectionFactory connectionFactory,
                              IPerfLogger <T> perfLogger,
                              IMetricsReporter metricsReporter)
 {
     _perfLogger         = perfLogger;
     _metricsReporter    = metricsReporter;
     _connectionProvider = connectionFactory.GetConnectionProvider <T>();
 }
Exemplo n.º 5
0
        public SqlConnectionProvider(string connectionString, IMetricsReporter metricsReporter)
        {
            if (string.IsNullOrEmpty(connectionString))
            {
                throw new ArgumentNullException(nameof(connectionString));
            }

            _connectionString = connectionString;
            _metricsReporter  = metricsReporter;
            _schema           = ParseSchema(_connectionString);
        }
 public EventSubscription(Action <T> callback,
                          IExceptionLogger exceptionLogger,
                          IMetricsReporter metricsReporter,
                          bool async = false
                          )
 {
     _callback        = callback;
     _exceptionLogger = exceptionLogger;
     _metricsReporter = metricsReporter;
     _async           = async;
     Target           = _callback.Target?.GetType() ?? typeof(T);
 }
Exemplo n.º 7
0
        public void IMetricsReporter_Test()
        {
            //IMetricsReporter _reporter =
            //    _reporterFactory.ForContext<ApiDesignTestsB>();
            IMetricsReporter _reporter =
                _reporterFactory.Build();
            IReadOnlyDictionary <string, string> tags = new Dictionary <string, string>
            {
                ["Active"]    = "true",
                ["Sentiment"] = "happy"
            };

            _reporter.Count();
            _reporter.Count(ImportanceLevel.High);
            _reporter.Count(ImportanceLevel.High, tags);

            using (_reporter.Duration())
            {
            }
        }
Exemplo n.º 8
0
 protected ApdexCounterBase(IMetricsReporter reporter)
 {
     _reporter = reporter;
     _cancellationTokenSource = new CancellationTokenSource();
 }
Exemplo n.º 9
0
 public HealthChecker(IMetricsReporter reporter)
 {
     _reporter = reporter;
     _cancellationTokenSource = new CancellationTokenSource();
 }
Exemplo n.º 10
0
 public ElasticSearchApdexCounter(IMetricsReporter reporter) : base(reporter)
 {
 }
Exemplo n.º 11
0
 public ErrorHandler(IMetricsReporter reporter)
 {
     _reporter = reporter;
 }
 public CallContextInitializer(IMetricsReporter reporter)
 {
     _reporter = reporter;
 }
 public static void AddMetricReporter(IMetricsReporter mr)
 {
     _reporters.Add(mr);
 }
Exemplo n.º 14
0
 public ServiceBehavior(IMetricsReporter reporter)
 {
     _reporter = reporter;
 }
Exemplo n.º 15
0
 public ParametersInspector(IMetricsReporter reporter)
 {
     _reporter = reporter;
 }
Exemplo n.º 16
0
 public RatesCounterBase(IMetricsReporter reporter)
 {
     _reporter = reporter;
     _cancellationTokenSource = new CancellationTokenSource();
 }
Exemplo n.º 17
0
 public EndpointBehavior(IMetricsReporter reporter)
 {
     _reporter = reporter;
 }
 public ElasticSearchRatesCounter(IMetricsReporter reporter) : base(reporter)
 {
 }
Exemplo n.º 19
0
 public SqlConnectionFactory(IMetricsReporter metricsReporter)
 {
     _metricsReporter = metricsReporter;
 }
 public EventsAggreagatorTests()
 {
     _metricsReporter = MockRepository.GenerateMock <IMetricsReporter>();
     _exceptionLogger = MockRepository.GenerateMock <IExceptionLogger>();
     _target          = new EventsAggregator(_metricsReporter, _exceptionLogger);
 }