public TrackRequestContextMiddleware(RequestDelegate next, IApplicationRequestContext requestContext) { _next = next; _requestContext = requestContext; }
public async Task InvokeAsync(HttpContext context, IApplicationRequestContext requestContext) { _logger.LogInformation($"X-Guid : {requestContext.Id}"); context.Response.Headers.Add("X-Guid", requestContext.Id.ToString()); await _next(context); }
public DiagnosticController(IApplicationRequestContext requestContext, IOptionsMonitor <DiagnosticOptions> options) { _requestContext = requestContext; _options = options.CurrentValue; }
public async Task InvokeAsync(HttpContext context, IApplicationRequestContext requestContext) { _logger.LogInformation($"X-Guid : {requestContext.Id}"); await _next(context); }
public DiagnosticController(IApplicationRequestContext requestContext, IOptions <DiagnosticOptions> options) { _requestContext = requestContext; _options = options.Value; }