- Closes#60024
- Change PrometheusClient.new to accept a base url instead of an
already created RestClient
- Use Gitlab::HTTP in PrometheusClient instead of creating RestClient
in PrometheusService
- Move http_options from PrometheusService to
PrometheusClient (follow_redirects: false)
- ensure that base urls don't have the trailing slash
- Created a `PrometheusClient#url` method that might not be strictly
required
- Change rescued exceptions from RestClient::* to
HTTParty::ResponseError where possible and StandardError for the
rest
Prior this commit exceptions raised during a HTTP request
weren't caught by the Sentry client and were passed to the user.
In addition the Sentry client tried to catch a non-existent error
`Sentry::Client::SentryError`.
Now, the Sentry client catches all possible errors coming from
a HTTP request.