summaryrefslogtreecommitdiff
path: root/doc/operations/error_tracking.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/operations/error_tracking.md')
-rw-r--r--doc/operations/error_tracking.md53
1 files changed, 52 insertions, 1 deletions
diff --git a/doc/operations/error_tracking.md b/doc/operations/error_tracking.md
index 9234ca36634..e694105d794 100644
--- a/doc/operations/error_tracking.md
+++ b/doc/operations/error_tracking.md
@@ -50,7 +50,7 @@ You may also want to enable Sentry's GitLab integration by following the steps i
### Enable GitLab Runner
To configure GitLab Runner with Sentry, you must add the value for `sentry_dsn` to your GitLab
-Runner's `config.toml` configuration file, as referenced in [GitLab Runner Advanced Configuraton](https://docs.gitlab.com/runner/configuration/advanced-configuration.html).
+Runner's `config.toml` configuration file, as referenced in [GitLab Runner Advanced Configuration](https://docs.gitlab.com/runner/configuration/advanced-configuration.html).
While setting up Sentry, select **Go** if you're asked for the project type.
If you see the following error in your GitLab Runner logs, then you should specify the deprecated
@@ -108,3 +108,54 @@ clicking the **Resolve** button near the top of the page.
Marking an error as resolved indicates that the error has stopped firing events. If a GitLab issue is linked to the error, then the issue closes.
If another event occurs, the error reverts to unresolved.
+
+## Integrated error tracking
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/329596) in GitLab 14.3.
+
+Integrated error tracking is a lightweight alternative to Sentry backend.
+You still use Sentry SDK with your application. But you don't need to deploy Sentry
+or set up for cloud-hosted Sentry. Instead, you use GitLab as a backend for it.
+
+Sentry backend automatically assigns a Data Source Name (DSN) for every project you create.
+GitLab does the same. You should be able to find a DSN for your project in the GitLab error tracking
+settings. By using a GitLab-provided DSN, your application connects to GitLab to report an error.
+Those errors are stored in the GitLab database and rendered by the GitLab UI, in the same way as
+Sentry integration.
+
+### Project settings
+
+The feature should be enabled on the project level. However, there is no UI to enable this feature yet.
+You must use the GitLab API to enable it.
+
+#### How to enable
+
+1. Select **GitLab** as the error tracking backend for your project:
+
+ ![Error Tracking Settings](img/error_tracking_setting_v14_3.png)
+
+1. Create a client key (DSN) to use with Sentry SDK in your application. Make sure to save the
+ response, as it contains a DSN:
+
+ ```shell
+ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
+ "https://gitlab.example.com/api/v4/projects/PROJECT_ID/error_tracking/client_keys"
+ ```
+
+1. Take the DSN from the previous step and configure your Sentry SDK with it. Errors are now
+ reported to the GitLab collector and are visible in the [GitLab UI](#error-tracking-list).
+
+#### How to disable
+
+To disable the feature, run this command. This is the same command as the one that enables the
+feature, but with a `false` value instead:
+
+```shell
+curl --request PATCH --header "PRIVATE-TOKEN: <your_access_token>" \
+ "https://gitlab.example.com/api/v4/projects/PROJECT_ID/error_tracking/settings?active=false&integrated=false"
+```
+
+#### Limitations
+
+The Integrated Error Tracking feature was built and tested with Sentry SDK for Ruby. Other languages and frameworks
+are not tested and might not work. Check [the compatibility issue](https://gitlab.com/gitlab-org/gitlab/-/issues/340178) for more information.