Exemple #1
0
        public MetricSender([CanBeNull] string service)
        {
            var connectionString = ApplicationConfiguration.Read <UlearnConfiguration>().StatsdConnectionString;

            if (string.IsNullOrEmpty(connectionString))
            {
                return;
            }

            var config = StatsdConfiguration.CreateFrom(connectionString);

            prefix       = config.Prefix;
            this.service = service ?? System.Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToLower();

            statsd = CreateStatsd(config);
        }
Exemple #2
0
        public MetricSender(string service)
        {
            var connectionString = ApplicationConfiguration.Read <UlearnConfiguration>().StatsdConnectionString;

            if (string.IsNullOrEmpty(connectionString))
            {
                return;
            }

            var config = StatsdConfiguration.CreateFrom(connectionString);

            prefix       = config.Prefix;
            this.service = service;

            statsd = CreateStatsd(config);
        }