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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 15:07:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 15:07:43 +0300
commitd10a462fedbd7794a83abdba9b4526600f71de5b (patch)
tree4dbd21cb89013d9e07b05bac5101cd13585a8be5 /doc/development/logging.md
parent13867d66e92c2fd8962a126db4fbdc32891343c9 (diff)
Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-80898
Diffstat (limited to 'doc/development/logging.md')
-rw-r--r--doc/development/logging.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/development/logging.md b/doc/development/logging.md
index 4ccb5a1a06e..2eb140d3b7e 100644
--- a/doc/development/logging.md
+++ b/doc/development/logging.md
@@ -142,21 +142,21 @@ It should be noted that manual logging of exceptions is not allowed, as:
1. It is very likely that manually logged exceptions will end-up across
multiple files, which increases burden scraping all logging files.
-To avoid duplicating and having consistent behavior the `Gitlab::Sentry`
+To avoid duplicating and having consistent behavior the `Gitlab::ErrorTracking`
provides helper methods to track exceptions:
-1. `Gitlab::Sentry.track_and_raise_exception`: this method logs,
+1. `Gitlab::ErrorTracking.track_and_raise_exception`: this method logs,
sends exception to Sentry (if configured) and re-raises the exception,
-1. `Gitlab::Sentry.track_exception`: this method only logs
+1. `Gitlab::ErrorTracking.track_exception`: this method only logs
and sends exception to Sentry (if configured),
-1. `Gitlab::Sentry.log_exception`: this method only logs the exception,
+1. `Gitlab::ErrorTracking.log_exception`: this method only logs the exception,
and DOES NOT send the exception to Sentry,
-1. `Gitlab::Sentry.track_and_raise_for_dev_exception`: this method logs,
+1. `Gitlab::ErrorTracking.track_and_raise_for_dev_exception`: this method logs,
sends exception to Sentry (if configured) and re-raises the exception
for development and test enviroments.
-It is advised to only use `Gitlab::Sentry.track_and_raise_exception`
-and `Gitlab::Sentry.track_exception` as presented on below examples.
+It is advised to only use `Gitlab::ErrorTracking.track_and_raise_exception`
+and `Gitlab::ErrorTracking.track_exception` as presented on below examples.
Consider adding additional extra parameters to provide more context
for each tracked exception.
@@ -170,7 +170,7 @@ class MyService < ::BaseService
success
rescue => e
- Gitlab::Sentry.track_exception(e, project_id: project.id)
+ Gitlab::ErrorTracking.track_exception(e, project_id: project.id)
error('Exception occurred')
end
@@ -184,7 +184,7 @@ class MyService < ::BaseService
success
rescue => e
- Gitlab::Sentry.track_and_raise_exception(e, project_id: project.id)
+ Gitlab::ErrorTracking.track_and_raise_exception(e, project_id: project.id)
end
end
```