Ejemplo n.º 1
0
        public static async Task <dynamic> RunAsync(Func <Task <dynamic> > action)
        {
            try
            {
                return(await action());
            }
            catch (Exception ex)
            {
                NewRelicAgent.NoticeError(ex);
                ErrorSignal.FromContext(HttpContext.Current).Raise(ex);

                Response exceptionResponse = ex.Message;
                exceptionResponse.StatusCode = HttpStatusCode.NotAcceptable;

                return(exceptionResponse);
            }
        }
Ejemplo n.º 2
0
 public void TrackException(Exception exception, IDictionary <string, string> properties = null, IDictionary <string, double> metrics = null)
 {
     AddMetric(metrics);
     NRClient.NoticeError(exception, properties);
 }