Exemplo n.º 1
0
 public static void Finish(IApmContext apmContext, ApmHttpClientFinishInformation apmWebApiFinishInformation)
 {
     foreach (var counter in CounterHandlers)
     {
         counter.Finish(apmContext, apmWebApiFinishInformation);
     }
 }
        public static void Finish(IApmContext apmContext, ApmHttpClientFinishInformation apmWebApiFinishInformation)
        {
            var message = string.Format("CR - Finish - {0} - {1} in {2} ms", apmWebApiFinishInformation.EventName,
                                        apmWebApiFinishInformation.TraceId, apmWebApiFinishInformation.ResponseTime);

            Log.Log(message, LogLevel.Info, apmContext);
        }
        public void Finish(IApmContext apmContext, ApmHttpClientFinishInformation apmHttpClientFinishInformation)
        {
            object counterProperty;

            if (apmContext.TryGetValue(LastOperationExecutionTimeMsCounter, out counterProperty))
            {
                var counter = (System.Diagnostics.PerformanceCounter)counterProperty;
                counter.RawValue = apmHttpClientFinishInformation.ResponseTime;
            }
        }
Exemplo n.º 4
0
        public void Finish(IApmContext apmContext, ApmHttpClientFinishInformation apmHttpClientFinishInformation)
        {
            object counterProperty;

            if (apmContext.TryGetValue(TotalCountCounter, out counterProperty))
            {
                var counter = (System.Diagnostics.PerformanceCounter)counterProperty;
                counter.Increment();
            }
        }
        public static void Finish(IApmContext apmContext, ApmHttpClientFinishInformation apmWebApiFinishInformation)
        {
            var message  = string.Format("CR - Finish - {0} - {1} in {2} ms", apmWebApiFinishInformation.EventName, apmWebApiFinishInformation.TraceId, apmWebApiFinishInformation.ResponseTime);
            var logger   = Log.Logger;
            var logEvent = new LoggingEvent(DeclaringType, logger.Repository, logger.Name, Level.Info, message, null);

            foreach (var property in apmContext)
            {
                logEvent.Properties[property.Key] = property.Value;
            }

            logger.Log(logEvent);
        }
Exemplo n.º 6
0
        public void Finish(IApmContext apmContext, ApmHttpClientFinishInformation apmHttpClientFinishInformation)
        {
            object counterProperty;

            if (apmContext.TryGetValue(AverageTimeTakenMsCounter, out counterProperty))
            {
                var counter = (System.Diagnostics.PerformanceCounter)counterProperty;
                counter.IncrementBy(apmHttpClientFinishInformation.ResponseTime);
            }

            object baseCounterProperty;

            if (apmContext.TryGetValue(AverageTimeTakenMsBaseCounter, out baseCounterProperty))
            {
                var baseCounter = (System.Diagnostics.PerformanceCounter)baseCounterProperty;
                baseCounter.Increment();
            }
        }
Exemplo n.º 7
0
 public static void Finish(IApmContext apmContext, ApmHttpClientFinishInformation apmWebApiFinishInformation)
 {
 }