private async Task FlushTracesAsync()
        {
            var traces = _tracesBuffer.Pop();

            if (traces.Any())
            {
                await _api.SendTracesAsync(traces).ConfigureAwait(false);
            }
        }
Esempio n. 2
0
        private async Task FlushTracesAsync()
        {
            var traces = _tracesBuffer.Pop();

            if (traces.Any())
            {
                await _api.SendTracesAsync(traces);
            }
        }
Esempio n. 3
0
        public async Task FlushTracesAsync()
        {
            var traces = _tracesBuffer.Pop();

            if (_statsd != null)
            {
                var spanCount = traces.Sum(t => t.Length);

                _statsd.Increment(TracerMetricNames.Queue.DequeuedTraces, traces.Length);
                _statsd.Increment(TracerMetricNames.Queue.DequeuedSpans, spanCount);
                _statsd.Gauge(TracerMetricNames.Queue.MaxTraces, _tracesBuffer.MaxSize);
            }

            if (traces.Length > 0)
            {
                await _api.SendTracesAsync(traces).ConfigureAwait(false);
            }
        }
Esempio n. 4
0
        private async Task FlushTracesAsync()
        {
            var traces    = _tracesBuffer.Pop();
            var spanCount = traces.Sum(t => t.Count);

            if (_statsd != null)
            {
                _statsd.AppendSetGauge(TracerMetricNames.Queue.DequeuedTraces, traces.Count);
                _statsd.AppendSetGauge(TracerMetricNames.Queue.DequeuedSpans, spanCount);
                _statsd.AppendSetGauge(TracerMetricNames.Queue.MaxCapacity, TraceBufferSize);
                _statsd.Send();
            }

            if (traces.Any())
            {
                await _api.SendTracesAsync(traces).ConfigureAwait(false);
            }
        }