Ditched app.metrics

This commit is contained in:
2020-05-24 21:51:03 +00:00
parent f0153eaa0f
commit c2f6fd94c1
12 changed files with 404 additions and 499 deletions

View File

@@ -7,7 +7,6 @@ using System.Net.Http;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Microsoft.Extensions.Logging;
using App.Metrics;
using AyaNova.Util;
using AyaNova.Biz;
@@ -82,11 +81,6 @@ namespace AyaNova.Api.ControllerHelpers
log.LogError(context.Exception, "Error");
//Track this exception
IMetrics metrics = (IMetrics)ServiceProviderProvider.Provider.GetService(typeof(IMetrics));
metrics.Measure.Meter.Mark(MetricsRegistry.UnhandledExceptionsMeter, context.Exception.GetType().ToString());
HttpResponse response = context.HttpContext.Response;
response.StatusCode = (int)status;
response.ContentType = "application/json; charset=utf-8";