public void Extract_MissingTraceIdHeader_Exception()
        {
            _headers.Set(HttpHeaderParentId, "10");
            var context = HeaderCollectionPropagator.Extract(_headers);

            Assert.Null(context);
        }
示例#2
0
 /// <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());
 }