Esempio n. 1
0
        public Agent (String apiKey, string prefix = null) {
            _validateMetric = new Regex(
                @"^[\d\w\-_]+(\.[\d\w\-_]+)+$",
                RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.ExplicitCapture
            );

            if (!string.IsNullOrEmpty(apiKey))
                _collector = new Collector(apiKey);

            if (!string.IsNullOrEmpty(prefix))
                ValidateMetricName(prefix + "fake");
            _prefix = prefix ?? "";
        }
Esempio n. 2
0
 public Agent(String apiKey)
 {
     Enabled = true;
     Synchronous = false;
     _collector = new Collector(apiKey);
 }