public ISpanBuilder AsChildOf(ISpanContext parent) { lock (_lock) { _parent = (OpenTracingSpanContext)parent; return(this); } }
public void Inject(OpenTracingSpanContext spanContext, object carrier) { ITextMap map = carrier as ITextMap; if (map == null) { throw new NotSupportedException("Carrier should have type ITextMap"); } map.Set(HttpHeaderNames.HttpHeaderParentId, spanContext.Context.SpanId.ToString()); map.Set(HttpHeaderNames.HttpHeaderTraceId, spanContext.Context.TraceId.ToString()); }
public ISpanBuilder AddReference(string referenceType, ISpanContext referencedContext) { lock (_lock) { if (referenceType == References.ChildOf) { _parent = (OpenTracingSpanContext)referencedContext; return(this); } } _log.Debug("ISpanBuilder.AddReference is not implemented for other references than ChildOf by Datadog.Trace"); return(this); }
internal OpenTracingSpan(Span span) { Span = span; Context = new OpenTracingSpanContext(Span.Context); }