public void Extract_MissingTraceIdHeader_Exception() { _headers.Set(HttpHeaderParentId, "10"); var context = HeaderCollectionPropagator.Extract(_headers); Assert.Null(context); }
/// <summary> /// Injects the specified <see cref="SpanContext"/> in the <see cref="IHeaderCollection"/>. /// </summary> /// <param name="headers">The headers.</param> /// <param name="context">The context.</param> public static void Inject(this IHeaderCollection headers, SpanContext context) { headers.Set(HttpHeaderNames.HttpHeaderParentId, context.SpanId.ToString()); headers.Set(HttpHeaderNames.HttpHeaderTraceId, context.TraceId.ToString()); }