Log error for CustomersDot unsuccessful requests
What does this MR do and why?
It is discovered many requests to CustomersDot fails (10000/day). However it is not visible at the log in CustomersDot. This MR is to aid the investigation on failure.
How to set up and validate locally
- Stub your gitlab, change
lib/gitlab/http_connection_adapter.rb
to allow local request:def allow_local_requests? - options.fetch(:allow_local_requests, allow_settings_local_requests?) + true end
- Start CDot
- Start gitlab rails console
-
tail -f log/exceptions_json.log
on gitlab repo - In rails console:
Gitlab::SubscriptionPortal::Client.update_namespace_name('a','b')
{success: true}
in the log - Open CDot's
config/routes.rb
, edit graphql line topost "/graphql", to: proc { [500, {}, ['body']] }
, you can observe the error being logged - Open CDot's
config/routes.rb
, edit graphql line topost "/graphql", to: proc { [400, {}, ['body']] }
, you can observe the error being logged
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #365263
Edited by Mark Chao