public void GetTraceIdWhenOneIsNotSpecified() { var request = new HttpRequestMessage(); var apmRequestParser = new ApmHttpRequestMessageParser(); var traceId = apmRequestParser.GetTraceId(request); Assert.IsEmpty(traceId); }
public void GetTraceIdWhenAnInvalidOneIsSpecifiedInProperties() { var request = new HttpRequestMessage(); request.Properties.Add(Constants.TraceIdHeaderKey, "jimmm,bobby,susan"); var apmRequestParser = new ApmHttpRequestMessageParser(); var traceId = apmRequestParser.GetTraceId(request); Assert.AreEqual("jimmm,bobby,susan", traceId); }
public void GetTraceIdWhenAValidOneIsSpecifiedInProperties() { var request = new HttpRequestMessage(); request.Properties.Add(Constants.TraceIdHeaderKey, "clienta=ADSFFF"); var apmRequestParser = new ApmHttpRequestMessageParser(); var traceId = apmRequestParser.GetTraceId(request); Assert.AreEqual("clienta=ADSFFF", traceId); }