private static TracerIndentity Create(string tracerId, string spanId) { var tracer = new TracerIndentity(); tracer._tracerId = tracerId; tracer._spanId = spanId; return(tracer); }
public static TracerIndentity Create() { var tracer = new TracerIndentity(); //generate a tracerid //guid(length:32) + random(length:4) tracer._tracerId = Guid.NewGuid().ToString("N") + Rnd(1000, 9999).ToString(); tracer._spanId = "0"; return(tracer); }
public static TracerIndentity FromString(string s) { if (s.Contains(":")) { var splits = s.Split(Spliter, StringSplitOptions.RemoveEmptyEntries); return(TracerIndentity.Create(splits[0], splits[1])); } else { return(null); } }