/// <inheritdoc />
        public void Report(WavefrontSpan span)
        {
            try
            {
                var context          = (WavefrontSpanContext)span.Context;
                var parentReferences = span.GetParents();
                var followReferences = span.GetFollows();

                var parents = parentReferences?
                              .Select(parent => parent.SpanContext.GetSpanId())
                              .ToList();

                var follows = followReferences?
                              .Select(follow => follow.SpanContext.GetSpanId())
                              .ToList();

                wavefrontSender.SendSpan(
                    span.GetOperationName(), span.GetStartTimeMillis(), span.GetDurationMillis(),
                    source, context.GetTraceId(), context.GetSpanId(), parents, follows,
                    span.GetTagsAsList().ToList(), null
                    );
            }
            catch (IOException)
            {
                if (logger.IsEnabled(LogLevel.Debug))
                {
                    logger.Log(LogLevel.Debug, "Dropping span " + span);
                }
            }
        }
Пример #2
0
        public void Report(WavefrontSpan span)
        {
            var context          = (WavefrontSpanContext)span.Context;
            var parentReferences = span.GetParents();
            var followReferences = span.GetFollows();

            var parents = parentReferences?
                          .Select(parent => parent.SpanContext.GetSpanId())
                          .ToList();

            var follows = followReferences?
                          .Select(follow => follow.SpanContext.GetSpanId())
                          .ToList();

            var spanLine = Utils.TracingSpanToLineData(
                span.GetOperationName(), span.GetStartTimeMillis(), span.GetDurationMillis(),
                source, context.GetTraceId(), context.GetSpanId(), parents, follows,
                span.GetTagsAsList().ToList(), null, "unknown"
                );

            Console.WriteLine("Finished span: " + spanLine);
        }
 private static long FinishTimeMillis(WavefrontSpan span)
 {
     return(span.GetStartTimeMillis() + span.GetDurationMillis());
 }