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
e7c12a3c
Commit
e7c12a3c
authored
Feb 09, 2021
by
Quang-Minh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user to ApplicationContext
parent
09a03bae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
app/services/merge_requests/base_service.rb
app/services/merge_requests/base_service.rb
+3
-1
lib/api/helpers.rb
lib/api/helpers.rb
+3
-1
lib/gitlab/error_tracking/processor/context_payload_processor.rb
...lab/error_tracking/processor/context_payload_processor.rb
+0
-2
No files found.
app/services/merge_requests/base_service.rb
View file @
e7c12a3c
...
@@ -181,7 +181,9 @@ module MergeRequests
...
@@ -181,7 +181,9 @@ module MergeRequests
}
}
if
exception
if
exception
Gitlab
::
ErrorTracking
.
track_exception
(
exception
,
data
)
Gitlab
::
ApplicationContext
.
with_context
(
user:
current_user
)
do
Gitlab
::
ErrorTracking
.
track_exception
(
exception
,
data
)
end
data
[
:"exception.message"
]
=
exception
.
message
data
[
:"exception.message"
]
=
exception
.
message
end
end
...
...
lib/api/helpers.rb
View file @
e7c12a3c
...
@@ -467,7 +467,9 @@ module API
...
@@ -467,7 +467,9 @@ module API
def
handle_api_exception
(
exception
)
def
handle_api_exception
(
exception
)
if
report_exception?
(
exception
)
if
report_exception?
(
exception
)
define_params_for_grape_middleware
define_params_for_grape_middleware
Gitlab
::
ErrorTracking
.
track_exception
(
exception
)
Gitlab
::
ApplicationContext
.
with_context
(
user:
current_user
)
do
Gitlab
::
ErrorTracking
.
track_exception
(
exception
)
end
end
end
# This is used with GrapeLogging::Loggers::ExceptionLogger
# This is used with GrapeLogging::Loggers::ExceptionLogger
...
...
lib/gitlab/error_tracking/processor/context_payload_processor.rb
View file @
e7c12a3c
# frozen_string_literal: true
# frozen_string_literal: true
require
'set'
module
Gitlab
module
Gitlab
module
ErrorTracking
module
ErrorTracking
module
Processor
module
Processor
...
...
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