예제 #1
0
        public override void OnStart(Activity data)
        {
            var tags = data.TagObjects
                       .Concat(data.Tags.Select(k => new KeyValuePair <string, object>(k.Key, k.Value)));

            _processor.ProcessActivity(true, data.StartTimeUtc, data.OperationName, data.DisplayName, tags, data.SpanId.ToString(), data.TraceId.ToString());
        }
        private void Process(Activity activity)
        {
            bool continueProcessing = true;

            for (int i = 0; i < _processors.Count && continueProcessing; i++)
            {
                IActivityProcessor processor = _processors[i];
                if (processor != null)
                {
                    try
                    {
                        processor.ProcessActivity(activity, out continueProcessing);
                    }
                    catch (Exception ex)
                    {
                        continueProcessing = true;
                        LogInternalError(ex);
                    }
                }
            }
        }