You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/en/guide/usage.md
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,41 @@
1
1
---
2
-
title: Usage
3
-
description: 'Usage of Sentry into Nuxt'
2
+
title: Usage / API
3
+
description: 'Usage of Sentry in Nuxt'
4
4
position: 3
5
5
category: Guide
6
6
---
7
7
8
-
Enter your DSN in the Nuxt.js config file. Additional config options can be found [here](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/).
9
-
10
8
### Automatic Capturing
11
-
Once installed, Sentry automatically reports errors, uncaught exceptions, and unhandled rejections. No need for further steps, unless you like to report (certain) exceptions manually (or have deactivated integrations like 'GlobalError'). In this case, find below how to send reports manually.
9
+
10
+
Once enabled, Sentry automatically reports errors, uncaught exceptions and unhandled rejections. No need for further steps, unless you like to report (certain) exceptions manually or have deactivated integrations like `GlobalError`. In this case, find out below how to send reports manually.
11
+
12
+
### Enriching Reported Events
13
+
14
+
Sentry SDK provides API for enhancing events that are being reported. For example, you can:
15
+
- set user information like IP address or username using `Sentry.setUser` API
16
+
- add custom structured data using `Sentry.setContext` API
17
+
- set custom key/value pairs (tags) that get indexed and can be used for filtering and searching using `Sentry.setTag` API
18
+
- add file attachments using `scope.addAttachment` API
19
+
- manually add breadcrumbs using `Sentry.addBreadcrumb` API
20
+
- and other...
21
+
22
+
Read more about [Enriching Events](https://docs.sentry.io/platforms/javascript/guides/vue/enriching-events/).
12
23
13
24
### Usage in Vue components
14
25
15
26
In a Vue component, `Sentry` is available as `this.$sentry`, so we can call functions like
0 commit comments