Ejemplo n.º 1
0
	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;
	}
Ejemplo n.º 2
0
 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));
 }
Ejemplo n.º 3
0
 static ActorTrace()
 {
     TraceConfig.InitializeFromConfigStore();
     Source = new FabricEvents.ExtensionsEvents(FabricEvents.Tasks.ActorFramework);
 }
Ejemplo n.º 4
0
 /// <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)
 {
 }
Ejemplo n.º 5
0
 public static string GetTraceEndPoint(this TraceConfig config, string defaultValue = "http://localhost:14268/api/traces")
 {
     return(config.TryGet(TraceEndPointKey, defaultValue));
 }
Ejemplo n.º 6
0
 public TracerTest()
 {
     spanProcessor = new SimpleSpanProcessor(new NoopSpanExporter());
     traceConfig   = TraceConfig.Default;
     tracer        = new Tracer(spanProcessor, traceConfig);
 }
Ejemplo n.º 7
0
 public static void SetTraceEndPoint(this TraceConfig config, string value)
 {
     config.AddOrUpdate(TraceEndPointKey, value);
 }
Ejemplo n.º 8
0
	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;
		}
	}
Ejemplo n.º 9
0
 public frmTest(TraceConfig trace)
 {
     InitializeComponent();
     this.trace = trace;
     this.Text += trace.Instance.DataSource;
 }
Ejemplo n.º 10
0
 public void TestInitialize()
 {
     TraceConfig.InitializeFromConfigStore(testReader);
     TraceConfig.SetDefaultLevel(TraceSinkType.ETW, EventLevel.Informational);
 }
Ejemplo n.º 11
0
 static SFDeployerTrace()
 {
     SFDeployerTrace.TraceSource = FabricEvents.ExtensionsEvents.GetEventSource(FabricEvents.Tasks.SystemFabricDeployer);
     TraceConfig.SetDefaultLevel(TraceSinkType.Console, EventLevel.Error);
     TraceConfig.AddFilter(TraceSinkType.Console, "SystemFabricDeployer:4");
 }