public static TraceConfig GetTraceConfig(int id) { if(_traceConfig.ContainsKey(id)) { return _traceConfig[id]; } string path = DataAccessor.GetTracePathByID(id); TraceConfigSerializable traceData = DataAccessor.LoadObjectFromJsonFile<TraceConfigSerializable>(path); List<MovePoint> configData = new List<MovePoint>(); foreach (var item in traceData.MovePoints) { configData.Add(new MovePoint(item.x, item.y, item.Angle)); } TraceConfig config = new TraceConfig{MovePoints = configData}; if(traceData != null) { _traceConfig[id] = config; } return config; }
internal SpanBuilder(string name, SpanProcessor spanProcessor, TraceConfig traceConfig) { this.name = name ?? throw new ArgumentNullException(nameof(name)); this.spanProcessor = spanProcessor ?? throw new ArgumentNullException(nameof(spanProcessor)); this.traceConfig = traceConfig ?? throw new ArgumentNullException(nameof(traceConfig)); }
static ActorTrace() { TraceConfig.InitializeFromConfigStore(); Source = new FabricEvents.ExtensionsEvents(FabricEvents.Tasks.ActorFramework); }
/// <summary> /// Creates an instance of <see cref="ITracer"/>. /// </summary> /// <param name="spanProcessor">Span processor.</param> /// <param name="traceConfig">Trace configuration.</param> public Tracer(SpanProcessor spanProcessor, TraceConfig traceConfig) : this(spanProcessor, traceConfig, null, null) { }
public static string GetTraceEndPoint(this TraceConfig config, string defaultValue = "http://localhost:14268/api/traces") { return(config.TryGet(TraceEndPointKey, defaultValue)); }
public TracerTest() { spanProcessor = new SimpleSpanProcessor(new NoopSpanExporter()); traceConfig = TraceConfig.Default; tracer = new Tracer(spanProcessor, traceConfig); }
public static void SetTraceEndPoint(this TraceConfig config, string value) { config.AddOrUpdate(TraceEndPointKey, value); }
void drawTrace(TouchTrace tr, TraceConfig config) { if (tr.startPos != null) { Gizmos.color = config.StartColor; Gizmos.DrawSphere(tr.startPos.Value, config.SphereSize); } if (tr.endPos != null) { Gizmos.color = config.EndColor; Gizmos.DrawSphere(tr.endPos.Value, config.SphereSize); } Gizmos.color = config.PathColor; Vector3? fromPos = null; foreach (Vector3 pos in tr.positions) { if (fromPos == null) fromPos = (Vector3?)tr.startPos; if (fromPos != null) Gizmos.DrawLine(fromPos.Value, pos); fromPos = (Vector3?)pos; } }
public frmTest(TraceConfig trace) { InitializeComponent(); this.trace = trace; this.Text += trace.Instance.DataSource; }
public void TestInitialize() { TraceConfig.InitializeFromConfigStore(testReader); TraceConfig.SetDefaultLevel(TraceSinkType.ETW, EventLevel.Informational); }
static SFDeployerTrace() { SFDeployerTrace.TraceSource = FabricEvents.ExtensionsEvents.GetEventSource(FabricEvents.Tasks.SystemFabricDeployer); TraceConfig.SetDefaultLevel(TraceSinkType.Console, EventLevel.Error); TraceConfig.AddFilter(TraceSinkType.Console, "SystemFabricDeployer:4"); }