Esempio n. 1
0
        public override void Record(params Span[] spans)
        {
            if (spans == null || spans.Length == 0)
            {
                return;
            }

            if (_disposed == DisposedSet || _enqueuedSpans.Count + spans.Length >= MaxQueueSize)
            {
                _metrics.Dropping(spans.Length);
                return;
            }

            foreach (var span in spans)
            {
                if (span == null)
                {
                    continue;
                }

                _enqueuedSpans.Enqueue(span);
            }

            _spansEnqueuedEvent.Set();

            _metrics.Enqueued(spans.Length);
        }