Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
12321771
Commit
12321771
authored
Apr 04, 2019
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't send error backtrace to Sentry
As it already has the full error sent to it
parent
7cd9cdbe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
app/services/clusters/applications/base_helm_service.rb
app/services/clusters/applications/base_helm_service.rb
+6
-3
spec/support/shared_examples/services/base_helm_service_shared_examples.rb
...ed_examples/services/base_helm_service_shared_examples.rb
+7
-2
No files found.
app/services/clusters/applications/base_helm_service.rb
View file @
12321771
...
...
@@ -19,11 +19,14 @@ module Clusters
app_id:
app
.
id
,
project_ids:
app
.
cluster
.
project_ids
,
group_ids:
app
.
cluster
.
group_ids
,
message:
error
.
message
,
backtrace:
Gitlab
::
Profiler
.
clean_backtrace
(
error
.
backtrace
)
message:
error
.
message
}
logger
.
error
(
meta
)
logger_meta
=
meta
.
merge
(
backtrace:
Gitlab
::
Profiler
.
clean_backtrace
(
error
.
backtrace
)
)
logger
.
error
(
logger_meta
)
Gitlab
::
Sentry
.
track_acceptable_exception
(
error
,
extra:
meta
)
end
...
...
spec/support/shared_examples/services/base_helm_service_shared_examples.rb
View file @
12321771
...
...
@@ -5,7 +5,6 @@ shared_examples 'logs kubernetes errors' do
{
exception:
error_name
,
message:
error_message
,
backtrace:
instance_of
(
Array
),
service:
service
.
class
.
name
,
app_id:
application
.
id
,
project_ids:
application
.
cluster
.
project_ids
,
...
...
@@ -14,8 +13,14 @@ shared_examples 'logs kubernetes errors' do
}
end
let
(
:logger_hash
)
do
error_hash
.
merge
(
backtrace:
instance_of
(
Array
)
)
end
it
'logs into kubernetes.log and Sentry'
do
expect
(
service
.
send
(
:logger
)).
to
receive
(
:error
).
with
(
erro
r_hash
)
expect
(
service
.
send
(
:logger
)).
to
receive
(
:error
).
with
(
logge
r_hash
)
expect
(
Gitlab
::
Sentry
).
to
receive
(
:track_acceptable_exception
).
with
(
error
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment