Esempio n. 1
0
        public ConsumerTrace(string serviceName, string rpc, string encodedTraceId, string encodedSpanId,
                             string encodedParentSpanId, string sampledStr, string flagsStr)
        {
            var spanState = ExtractorHelper.TryParseTrace(encodedTraceId, encodedSpanId, encodedParentSpanId,
                                                          sampledStr, flagsStr);

            if (spanState != default(SpanState))
            {
                Trace = Trace.CreateFromId(spanState).Child();
            }
            else
            {
                Trace = Trace.Create();
            }

            Trace.Current = Trace;

            Trace.Record(Annotations.ConsumerStart());
            Trace.Record(Annotations.ServiceName(serviceName));
            Trace.Record(Annotations.Rpc(rpc));
        }