public IPointEmitter CreateEmitter(IPointEmitter parent, out Action dispose) { if (_client == null && !_emitters.Any()) { dispose = null; return(parent); } if (parent != null) { throw new ArgumentException("Parent may not be specified here"); } var result = new List <IPointEmitter>(); if (_client != null) { var emitter = new HttpLineProtocolEmitter(_client); dispose = emitter.Dispose; result.Add(emitter); } else { dispose = () => { }; } foreach (var emitter in _emitters) { result.Add(new DelegateEmitter(emitter)); } return(new AggregateEmitter(result)); }
internal CollectorConfiguration(IPointEmitter parent = null) { _parent = parent; _tag = new PipelinedCollectorTagConfiguration(this); _emitter = new PipelinedCollectorEmitConfiguration(this); _batcher = new PipelinedCollectorBatchConfiguration(this); }
public IntervalBatcher(TimeSpan interval, int?maxBatchSize, IPointEmitter parent) { _parent = parent; _interval = interval; _maxBatchSize = maxBatchSize; _timer = new PortableTimer(cancel => OnTick()); }
internal CollectorConfiguration(IPointEmitter parent = null) { _parent = parent; _tag = new PipelinedCollectorTagConfiguration(this); _emitter = new PipelinedCollectorEmitConfiguration(this); _batcher = new PipelinedCollectorBatchConfiguration(this); }
public IPointEmitter CreateEmitter(IPointEmitter parent, out Action dispose) { if (_client == null && !_emitters.Any()) { dispose = null; return parent; } if (parent != null) throw new ArgumentException("Parent may not be specified here"); var result = new List<IPointEmitter>(); if (_client != null) { var emitter = new HttpLineProtocolEmitter(_client); dispose = emitter.Dispose; result.Add(emitter); } else { dispose = () => { }; } foreach (var emitter in _emitters) { result.Add(new DelegateEmitter(emitter)); } return new AggregateEmitter(result); }
public IPointEmitter CreateEmitter(IPointEmitter parent, out Action dispose) { if (_interval == null) { dispose = null; return parent; } var batcher = new IntervalBatcher(_interval.Value, parent); dispose = batcher.Dispose; return batcher; }
public IPointEmitter CreateEmitter(IPointEmitter parent, out Action dispose) { if (_interval == null) { dispose = null; return(parent); } var batcher = new IntervalBatcher(_interval.Value, _maxBatchSize, parent); dispose = batcher.Dispose; return(batcher); }
public IPointEmitter CreateEmitter(IPointEmitter parent, out Action dispose) { if (parent != null) throw new ArgumentException("Parent may not be specified here"); if (_client == null) { dispose = null; return parent; } var emitter = new InfluxDBEmitter(_client); dispose = emitter.Dispose; return emitter; }
public IPointEmitter CreateEmitter(IPointEmitter parent, out Action dispose) { if (parent != null) { throw new ArgumentException("Parent may not be specified here"); } if (_client == null) { dispose = null; return(parent); } var emitter = new HttpLineProtocolEmitter(_client); dispose = emitter.Dispose; return(emitter); }
public IntervalBatcher(TimeSpan interval, IPointEmitter parent) { _parent = parent; _interval = interval; _timer = new PortableTimer(cancel => OnTick()); }
public PipelinedMetricsCollector(IPointEmitter emitter, IPointEnricher enricher, Action dispose) { _emitter = emitter; _enricher = enricher; _dispose = dispose; }
public PipelinedMetricsCollector(IPointEmitter emitter, IPointEnricher enricher, Action dispose) { _emitter = emitter; _enricher = enricher; _dispose = dispose; }