DatadogSharp icon indicating copy to clipboard operation
DatadogSharp copied to clipboard

TracingManager and ParentId

Open xpicio opened this issue 7 years ago • 1 comments

Hello i'm doing some test with APM client and i do not understand why in the root Span you force ParentId = null. On my test i'm working with a distributed monitoring, so i always receive a root information from an other platform / system but with ParentId = null i'm not able to link the first Span with the right parent. I'm using the BeginTracingto initialize the context.

I mean this code snippet in Dispose method in TracingManager class:

var span = new Span
            {
                TraceId = TraceId,
                SpanId = SpanId,
                Name = Name,
                Resource = Resource,
                Service = Service,
                Type = Type,
                Start = start,
                Duration = Span.ToNanoseconds(stopwatch.Elapsed),
                ParentId = null,
                Error = error,
                Meta = meta,
            };

Is it a right behaviour or a bug ?

At the moment i fixed with this code:

ParentId = this.parentId,

xpicio avatar Feb 26 '18 11:02 xpicio

same problem here, can we get this fix ? @neuecc

swASO avatar Aug 30 '18 14:08 swASO