diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-11-14 14:10:36 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-11-14 14:10:36 +0300 |
commit | ba7cfdc2d7f3f7da8effc0b445465ed760684575 (patch) | |
tree | 32417b0d35719444af1378d2ac031ae2025258d5 /app/services/clusters | |
parent | dff3ded57f6bb4777152fb429af906125526113e (diff) |
Track Kubernetes errors using Sentry
Diffstat (limited to 'app/services/clusters')
-rw-r--r-- | app/services/clusters/applications/check_installation_progress_service.rb | 1 | ||||
-rw-r--r-- | app/services/clusters/applications/install_service.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/services/clusters/applications/check_installation_progress_service.rb b/app/services/clusters/applications/check_installation_progress_service.rb index 49b8825c3a4..ca0f7b30053 100644 --- a/app/services/clusters/applications/check_installation_progress_service.rb +++ b/app/services/clusters/applications/check_installation_progress_service.rb @@ -16,6 +16,7 @@ module Clusters end rescue Kubeclient::HttpError => e Rails.logger.error("Kubernetes error: #{e.error_code} #{e.message}") + Gitlab::Sentry.track_acceptable_exception(e, extra: { scope: 'kubernetes', app_id: app.id }) app.make_errored!("Kubernetes error: #{e.error_code}") unless app.errored? end diff --git a/app/services/clusters/applications/install_service.rb b/app/services/clusters/applications/install_service.rb index 947d22022bc..f4385748c43 100644 --- a/app/services/clusters/applications/install_service.rb +++ b/app/services/clusters/applications/install_service.rb @@ -14,9 +14,11 @@ module Clusters ClusterWaitForAppInstallationWorker::INTERVAL, app.name, app.id) rescue Kubeclient::HttpError => e Rails.logger.error("Kubernetes error: #{e.error_code} #{e.message}") + Gitlab::Sentry.track_acceptable_exception(e, extra: { scope: 'kubernetes', app_id: app.id }) app.make_errored!("Kubernetes error: #{e.error_code}") rescue StandardError => e Rails.logger.error "Can't start installation process: #{e.class.name} #{e.message}" + Gitlab::Sentry.track_acceptable_exception(e, extra: { scope: 'kubernetes', app_id: app.id }) app.make_errored!("Can't start installation process.") end end |