// ReSharper disable once SuggestBaseTypeForParameter internal InstrumentorRequiredEventArgs(string categoryName, IInstrumentationInfo info) { CategoryName = categoryName; // TODO: TBD: ICloneable would be better but for potential snag with the custom Attributes Info = new InstrumentationInfo(info); _lazyInstrumentor = new Lazy <SimpleInstrumentor>(GetDefaultInstrumentor); }
public TraceData(IInstrumentationInfo info, long timeTakenMilli, string correlationId, InstrumentationContext context) { TimeTakenMilli = timeTakenMilli; Info = info; Context = context; CorrelationId = correlationId; }
public SimpleInstrumentor(IInstrumentationInfo info) { _info = info; if (info.CorrelationIdKey == null) { _info.CorrelationIdKey = Correlation.CorrelationIdKey; } PublishInstrumentationCallback = InstrumentationEventSource.Instance.WriteInstrumentationEvent; }
public SimpleInstrumentor(IInstrumentationInfo info, bool publishCounters = true, bool publishEvent = true, bool raisePublishErrors = false) { _info = info; PublishCounters = publishCounters; RaisePublishErrors = raisePublishErrors; PublishEvent = publishEvent; }
/// <summary> /// Copy Constructor /// </summary> /// <param name="other"></param> public InstrumentationInfo(IInstrumentationInfo other) { CategoryName = other.CategoryName; Counters = other.Counters.ToArray(); Description = other.Description; InstanceName = other.InstanceName; PublishCounters = other.PublishCounters; PublishEvent = other.PublishEvent; RaisePublishErrors = other.RaisePublishErrors; SamplingRate = other.SamplingRate; }
/// <summary> /// ProtectedConstructor. /// </summary> /// <param name="categoryName"></param> /// <param name="description"></param> protected InstrumentationInfoAttributeBase(string categoryName, string description = null) { /* Decorator should wrap the Info instead of being an Info. That gets us * away from Reflection overhead as early as possible. */ Info = new InstrumentationInfo { CategoryName = categoryName, Description = description ?? string.Empty }; }
public SimpleInstrumentor(IInstrumentationInfo info) { _info = info; _info.CorrelationIdKey = _info.CorrelationIdKey ?? Correlation.CorrelationIdKey; _tracers.Add("EventSourceTracer", new EventSourceTracer()); #if NET452 if (_info.PublishCounters) { _tracers.Add("PerformanceCounterTracer", new PerformanceCounterTracer(info)); } #endif PerfItRuntime.OnInstrumentorCreated(new InstrumentorCreatedArgs(this, info)); }
public TimedInstrumentationInfo(IInstrumentationInfo info) { this.CategoryName = info.CategoryName; this.CorrelationIdKey = info.CorrelationIdKey; this.Description = info.Description; this.InstanceName = info.InstanceName; this.Name = info.Name; this.RaisePublishErrors = info.RaisePublishErrors; this.SamplingRate = info.SamplingRate; #if NET452 this.PublishCounters = info.PublishCounters; this.Counters = info.Counters; #endif }
public object Start(IInstrumentationInfo info) { var trace = Trace.Current; var newTrace = trace == null?Trace.Create() : trace.Child(); Trace.Current = newTrace; var span = new Span(newTrace.CurrentSpan, DateTime.UtcNow) { ServiceName = info.CategoryName, Name = info.InstanceName }; OnStarting(span); return(new Tuple <IInstrumentationInfo, Span, Stopwatch>(info, span, Stopwatch.StartNew())); }
public SimpleInstrumentor(IInstrumentationInfo info) { _info = info; PublishInstrumentationCallback = InstrumentationEventSource.Instance.WriteInstrumentationEvent; }
public object Start(IInstrumentationInfo info) { return(BuildContexts()); }
public PerformanceCounterTracer(IInstrumentationInfo instrumentationInfo) { _info = instrumentationInfo; }
public PerfItFilterAttribute(string categoryName) { Info = new InstrumentationInfo { CategoryName = categoryName }; }
public object Start(IInstrumentationInfo info) { return(info); }
public InstrumentorCreatedArgs(IInstrumentor instrumentor, IInstrumentationInfo info) { Info = info; Instrumentor = instrumentor; }