Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Liza Mock <[email protected]>
  • Loading branch information
mydea and lizokm committed Aug 24, 2023
commit dcf17edbb221922ed7896a7b98a5043a75adb9d7
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Log calls to `console.log`, `console.debug`, etc.

Log all click and keypress events.

When an object with `serializeAttribute` key is provided, Breadcrumbs integration will look for given attribute(s) in DOM elements, while generating the breadcrumb trails. Matched elements will be followed by their custom attributes, instead of their `id`s or `class` names.
When an object with a `serializeAttribute` key is provided, the Breadcrumbs integration will look for given attribute(s) in DOM elements while generating the breadcrumb trails. Matched elements will be followed by their custom attributes, instead of their `id`s or `class` names.

- `fetch` (boolean)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: "Allows you to inspect the contents of a processed event and hint o
sidebar_order: 100
---

This integration allows you to inspect the contents of a processed event and hint object that gets passed to beforeSend or beforeSendTransaction. It will always run as the last integration, no matter when it was registered.
This integration allows you to inspect the contents of a processed event and hint object that gets passed to `beforeSend` or `beforeSendTransaction`. It will always run as the last integration, no matter when it was registered.

Note that this is different than setting `debug: true` in your Sentry.init options, which will enable debug logging in the console.
Note that this is different than setting `debug: true` (which will enable debug logging in the console) in your Sentry.init options.

This integration requires you to install `@sentry/integrations` next to your main SDK package.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ Sentry.init({

- `depth` (number)

Limit of how deep the object serializer should go. Anything deeper than limit will
be replaced with standard Node.js REPL notation of [Object], [Array], [Function] or
a primitive value. Defaults to 3.
Limit of how deep the object serializer should go. The default is 3. Anything deeper than the set limit will
be replaced with standard Node.js REPL notation of [Object], [Array], [Function], or
a primitive value.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_order: 1

_Import name: `Sentry.Integrations.GlobalHandlers`_

This integration attaches global handlers to capture uncaught exceptions and unhandled rejections. By default it captures errors & unhandled promise rejections.
This integration attaches global handlers to capture uncaught exceptions and unhandled rejections. It captures errors and unhandled promise rejections by default.

## Options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Sentry.init({

<Alert level="warning" title="Note">

Due to the limitations of both the Fetch and XHR API, the cookie and header collection for both requests and responses is based on best effort. Certain headers may be missing in the event created by the integration.
Due to the limitations of the Fetch and XHR API, the cookie and header collection for requests and responses is based on best effort. This means that certain headers may be missing in the event created by the integration.

</Alert>

Expand All @@ -74,10 +74,10 @@ This option is required for capturing headers and cookies.
- `failedRequestStatusCodes` (array)

This array can contain tuples of `[begin, end]` (both inclusive),
single status codes, or a combination of both.
single status codes, or a combination of the two.
Default: `[[500, 599]]`

- `failedRequestTargets` (array)

An array of request targets that should be considered, for example `['http://example.com/api/test']` would consider any request to this URL for failure. This array can contain Regexes, strings, or a combination of both.
An array of request targets that should be considered, for example `['http://example.com/api/test']` would interpret any request to this URL as a failure. This array can contain Regexes, strings, or a combination of the two.
Default: `[/.*/]`
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ sidebar_order: 1

_Import name: `Sentry.Integrations.HttpContext`_

This integration attaches HTTP request information, such as URL, user-agent, referrer, and other headers to the event.
This integration attaches HTTP request information, such as URL, user-agent, referrer, and other headers, to the event.
It allows us to correctly catalog and tag events with specific OS, browser, and version information.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ By default, it'll ignore errors that start with `Script error` or `Javascript er

To configure this integration, use the `ignoreErrors`, `ignoreTransactions`, `denyUrls`,
and `allowUrls` SDK options directly. Keep in mind that `denyURLs` and `allowURLs`
only work for captured exceptions, not raw message events.
only work for captured exceptions not raw message events.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ redirect_from:
- /platforms/javascript/configuration/integrations/default/
---

Sentry provides a number of integrations which are designed to add automatic instrumentation to your application.

Some of these integrations are enabled by default, while others have to be explicitly enabled.
Sentry provides a number of integrations which are designed to add automatic instrumentation to your application. Some of these integrations are enabled by default, while others have to be explicitly enabled.

## Available Integrations

Expand Down Expand Up @@ -49,7 +47,7 @@ For all other cases, we recommend you use the `integrations` option.

## Removing an Integration

This example removes the default-enabled integration for adding breadcrumbs to the event:
This example removes the integration for adding breadcrumbs to the event, which is enabled by default:

```javascript
Sentry.init({
Expand All @@ -65,4 +63,4 @@ Sentry.init({

## Custom Integrations

You can also create custom integrations. [Read more about custom integrations here.](./custom)
You can also create [custom integrations](./custom).
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_order: 1

_Import name: `Sentry.Integrations.LinkedErrors`_

This integration allows you to configure linked errors. They’ll be recursively read up to a specified limit, and lookup will be performed by a specific key. By default, the Sentry SDK sets the limit to five and the key used is `"cause"`.
This integration allows you to configure linked errors. They’ll be recursively read up to a specified limit, then lookup will be performed by a specific key. By default, the Sentry SDK sets the limit to five and the key used is `"cause"`.

## Options

Expand All @@ -16,6 +16,6 @@ This integration allows you to configure linked errors. They’ll be recursively

## Example

Here is a code example of how this could be implemented:
Here's a code example of how this could be implemented:

<PlatformContent includePath="configuration/linked-errors" />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ sidebar_order: 100
_Import name: `Sentry.Integrations.ModuleMetadata`_

Metadata can be injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.
When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events
under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams
our sources
Once this integration is added, the metadata passed to the bundler plugin will be added to the stack frames of all events under the `module_metadata` property. This can be used to help tag or route events from different teams
or sources.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Allows you to apply a transformation to each frame of the stack tr
sidebar_order: 100
---

This integration hooks into the ReportingObserver API and sends captured events through to Sentry. It can be configured to handle only specific issue types.
This integration hooks into the ReportingObserver API and sends captured events through to Sentry. It can be configured to handle specific issue types only.

```javascript {tabTitle: ESM}
import * as Sentry from "@sentry/browser";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Root path that will be stripped from the current frame's filename by the default

- `prefix` (string)

a custom prefix that will be used by the default iteratee.
A custom prefix that will be used by the default iteratee.
Default: `app://`

- `iteratee` (`(frame) => frame`)
Expand All @@ -82,4 +82,4 @@ For example, if the full path to your file is `/www/src/app/file.js`:
| --------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `RewriteFrames()` | `app:///file.js` | The default behavior is to replace the absolute path, except the filename, and prefix it with the default prefix (`app:///`). |
| `RewriteFrames({prefix: 'foo/'})` | `foo/file.js` | Prefix `foo/` is used instead of the default prefix `app:///`. |
| `RewriteFrames({root: '/www'})` | `app:///src/app/file.js` | `root` is defined as `/www`, so only that part is trimmed from beginning of the path. |
| `RewriteFrames({root: '/www'})` | `app:///src/app/file.js` | `root` is defined as `/www`, so only that part is trimmed from the beginning of the path. |
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ sidebar_order: 1

_Import name: `Sentry.Integrations.TryCatch`_

This integration wraps native time and events APIs (`setTimeout`, `setInterval`, `requestAnimationFrame`, `addEventListener/removeEventListener`) in `try/catch` blocks to handle async exceptions.
This integration wraps native time and event APIs (`setTimeout`, `setInterval`, `requestAnimationFrame`, `addEventListener/removeEventListener`) in `try/catch` blocks to handle async exceptions.