public async ValueTask InvokeAsync(IRequestContext context)
        {
            using (_diagnosticEvents.ExecuteRequest(context))
            {
                await _next(context).ConfigureAwait(false);

                if (context.Exception is { } exception)
                {
                    _diagnosticEvents.RequestError(context, exception);
                }
            }
        }