Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/clusters/concerns/application_core.rb')
-rw-r--r--app/models/clusters/concerns/application_core.rb22
1 files changed, 3 insertions, 19 deletions
diff --git a/app/models/clusters/concerns/application_core.rb b/app/models/clusters/concerns/application_core.rb
index ad6699daa78..2e40689a650 100644
--- a/app/models/clusters/concerns/application_core.rb
+++ b/app/models/clusters/concerns/application_core.rb
@@ -6,6 +6,8 @@ module Clusters
extend ActiveSupport::Concern
included do
+ include ::Clusters::Concerns::KubernetesLogger
+
belongs_to :cluster, class_name: 'Clusters::Cluster', foreign_key: :cluster_id
validates :cluster, presence: true
@@ -79,27 +81,9 @@ module Clusters
# Override if your application needs any action after
# being uninstalled by Helm
end
-
- def logger
- @logger ||= Gitlab::Kubernetes::Logger.build
- end
-
- def log_exception(error, event)
- logger.error({
- exception: error.class.name,
- status_code: error.error_code,
- cluster_id: cluster&.id,
- application_id: id,
- class_name: self.class.name,
- event: event,
- message: error.message
- })
-
- Gitlab::ErrorTracking.track_exception(error, cluster_id: cluster&.id, application_id: id)
- end
end
end
end
end
-Clusters::Concerns::ApplicationCore.prepend_if_ee('EE::Clusters::Concerns::ApplicationCore')
+Clusters::Concerns::ApplicationCore.prepend_mod_with('Clusters::Concerns::ApplicationCore')