Example #1
0
        public void GetTraceIdWhenOneIsNotSpecified()
        {
            var request          = new HttpRequestMessage();
            var apmRequestParser = new ApmHttpRequestMessageParser();
            var traceId          = apmRequestParser.GetTraceId(request);

            Assert.IsEmpty(traceId);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }