Commit a9c855f1 authored by Thong Kuah's avatar Thong Kuah

Do not send error name and message to Sentry

It's duplication information as we already send the full error object to
Sentry.
parent 12321771
...@@ -13,16 +13,16 @@ module Clusters ...@@ -13,16 +13,16 @@ module Clusters
def log_error(error) def log_error(error)
meta = { meta = {
exception: error.class.name,
error_code: error.respond_to?(:error_code) ? error.error_code : nil, error_code: error.respond_to?(:error_code) ? error.error_code : nil,
service: self.class.name, service: self.class.name,
app_id: app.id, app_id: app.id,
project_ids: app.cluster.project_ids, project_ids: app.cluster.project_ids,
group_ids: app.cluster.group_ids, group_ids: app.cluster.group_ids
message: error.message
} }
logger_meta = meta.merge( logger_meta = meta.merge(
exception: error.class.name,
message: error.message,
backtrace: Gitlab::Profiler.clean_backtrace(error.backtrace) backtrace: Gitlab::Profiler.clean_backtrace(error.backtrace)
) )
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
shared_examples 'logs kubernetes errors' do shared_examples 'logs kubernetes errors' do
let(:error_hash) do let(:error_hash) do
{ {
exception: error_name,
message: error_message,
service: service.class.name, service: service.class.name,
app_id: application.id, app_id: application.id,
project_ids: application.cluster.project_ids, project_ids: application.cluster.project_ids,
...@@ -15,6 +13,8 @@ shared_examples 'logs kubernetes errors' do ...@@ -15,6 +13,8 @@ shared_examples 'logs kubernetes errors' do
let(:logger_hash) do let(:logger_hash) do
error_hash.merge( error_hash.merge(
exception: error_name,
message: error_message,
backtrace: instance_of(Array) backtrace: instance_of(Array)
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment