Example #1
0
        public GraphiteReporter(GraphiteSender graphiteSender, IGraphiteMetricNameFormatter metricNameFormatter, string name, TimeSpan reportInterval, ILoggerFactory loggerFactory)
        {
            _graphiteSender      = graphiteSender;
            _metricNameFormatter = metricNameFormatter;
            _logger = loggerFactory.CreateLogger <GraphiteReporter>();

            Name           = name;
            ReportInterval = reportInterval;
        }
 /// <summary>
 /// Builds a <see cref="ConsoleReporter"/> with the given properties
 /// </summary>
 /// <returns>a <see cref="ConsoleReporter"/></returns>
 public GraphiteReporter Build(GraphiteSender sender)
 {
     return(new GraphiteReporter(registry,
                                 sender,
                                 clock,
                                 prefix,
                                 rateUnit,
                                 durationUnit,
                                 filter));
 }
 private GraphiteReporter(MetricRegistry registry,
                          GraphiteSender graphite,
                          Clock clock,
                          String prefix,
                          TimeUnit rateUnit,
                          TimeUnit durationUnit,
                          MetricFilter filter) : base(registry, "graphite-reporter", filter, rateUnit, durationUnit)
 {
     this.graphite = graphite;
     this.clock    = clock;
     this.prefix   = MetricName.build(prefix);
 }
Example #4
0
 public StatsDGraphiteReport(GraphiteSender sender, string rootNamespace) : base(sender)
 {
     _rootNamespace = rootNamespace;
 }
Example #5
0
 public static MetricsReports WithGraphite(this MetricsReports reports, GraphiteSender graphiteLink, TimeSpan interval)
 {
     return(reports.WithReport(new GraphiteReport(graphiteLink), interval));
 }
        private GraphiteReporter(MetricRegistry registry,
                         GraphiteSender graphite,
                         Clock clock,
                         String prefix,
                         TimeUnit rateUnit,
                         TimeUnit durationUnit,
                         MetricFilter filter) : base(registry, "graphite-reporter", filter, rateUnit, durationUnit)
        {

            this.graphite = graphite;
            this.clock = clock;
            this.prefix = MetricName.build(prefix);
        }
 /// <summary>
 /// Builds a <see cref="ConsoleReporter"/> with the given properties
 /// </summary>
 /// <returns>a <see cref="ConsoleReporter"/></returns>
 public GraphiteReporter Build(GraphiteSender sender)
 {
     return new GraphiteReporter(registry,
                                sender,
                                clock,
                                prefix,
                                rateUnit,
                                durationUnit,
                                filter);
 }
 public FilteredGraphiteReport(GraphiteSender sender) : base(sender)
 {
     contextPrefix = $"Billy.Treller.{Dns.GetHostName()}.";
 }
Example #9
0
 public static void Send(this GraphiteSender graphiteSender, string name, string value)
 {
     graphiteSender.Send(DateTime.UtcNow, name, value);
 }