Exemplo n.º 1
0
        public void GetTraceIdWhenOneIsNotSpecified()
        {
            var request          = new HttpRequestMessage();
            var apmRequestParser = new ApmHttpRequestMessageParser();
            var traceId          = apmRequestParser.GetTraceId(request);

            Assert.IsEmpty(traceId);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }