public Core( ITraceData traceData ) : base(traceData) { // do nothing. }
public void Register(string name, ITraceData traceData) { if (_traceDataRegistry.ContainsKey(name)) //throw new PBException("can't register TraceData, TraceData \"{0}\" already exist", name); _traceDataRegistry.Remove(name); _traceDataRegistry.Add(name, traceData); }
public void Register(string name, ITraceData traceData) { if (_traceDataRegistry.ContainsKey(name)) { //throw new PBException("can't register TraceData, TraceData \"{0}\" already exist", name); _traceDataRegistry.Remove(name); } _traceDataRegistry.Add(name, traceData); }
public Default( ITraceData traceData ) { kind = IdentifierKind.Trace; // // VIRTUAL: Id of the deepest derived class. // id = AttributeOps.GetObjectId(this); // // VIRTUAL: Group of the deepest derived class. // group = AttributeOps.GetObjectGroup(this); // // NOTE: Is the supplied trace data valid? // if (traceData != null) { EntityOps.MaybeSetGroup( this, traceData.Group); name = traceData.Name; description = traceData.Description; typeName = traceData.TypeName; methodName = traceData.MethodName; bindingFlags = traceData.BindingFlags; methodFlags = traceData.MethodFlags; token = traceData.Token; traceFlags = traceData.TraceFlags; plugin = traceData.Plugin; clientData = traceData.ClientData; } callback = null; }
/// <summary>创建一批采样数据</summary> /// <param name="data"></param> /// <param name="spans"></param> /// <returns></returns> public static IList <SampleData> Create(ITraceData data, IList <ISpan> spans) { var list = new List <SampleData>(); if (spans == null || spans.Count == 0) { return(list); } foreach (var item in spans) { var sd = new SampleData { DataId = data.ID, AppId = data.AppId, Name = data.Name, TraceId = item.TraceId, SpanId = item.Id, ParentId = item.ParentId, StartTime = item.StartTime, EndTime = item.EndTime, Tag = item.Tag, Error = item.Error, Success = item.Error.IsNullOrEmpty(), CreateIP = data.CreateIP, CreateTime = DateTime.Now, }; list.Add(sd); } return(list); }
public void SetModuleTask(ISequenceManager Seq) { m_IModuleTask = Seq; m_TraceService = (ITraceData)m_IModuleTask.GetService(typeof(ITraceData)); }
public void Add(ITraceData data) { this.Data.Add(data); }