Esempio n. 1
0
        private void HandleHttpContextDiagnostic(HttpContext httpContext, string key)
        {
            switch (key)
            {
            case "Microsoft.AspNetCore.Hosting.HttpRequestIn.Start":
                httpContext.Features.Set(_actionMetricFactory.Start(httpContext));
                break;

            case "Microsoft.AspNetCore.Hosting.HttpRequestIn.Stop":
                httpContext.Features.Get <ActionMetric>()?.Stop();
                break;
            }
        }
Esempio n. 2
0
 public virtual void BeginRequest(HttpContext httpContext)
 {
     httpContext?.Features.Set(_actionMetricFactory.Start(httpContext));
 }