diff --git a/src/docs/product/accounts/quotas/manage-event-stream-guide.mdx b/src/docs/product/accounts/quotas/manage-event-stream-guide.mdx index 5a055d12b6cc0..da2ccdbd000ff 100644 --- a/src/docs/product/accounts/quotas/manage-event-stream-guide.mdx +++ b/src/docs/product/accounts/quotas/manage-event-stream-guide.mdx @@ -244,9 +244,9 @@ To learn more and see code samples, check out: #### GlobalHandlers -This integration attaches global handlers to capture uncaught exceptions (`onerror`) and unhandled rejections (`onunhandledrejection`). Both handlers are enabled by default, but can be disabled through configuration. Learn more in [GlobalHandlers Integration](/platforms/javascript/configuration/integrations/default/#globalhandlers). +This integration attaches global handlers to capture uncaught exceptions (`onerror`) and unhandled rejections (`onunhandledrejection`). Both handlers are enabled by default, but can be disabled through configuration. Learn more in [GlobalHandlers Integration](/platforms/javascript/configuration/integrations/globalhandlers/). -Check out additional configuration options with the [tryCatch](/platforms/javascript/configuration/integrations/default/#trycatch) and [ReportingObserver](/platforms/javascript/configuration/integrations/plugin/#reportingobserver) integrations. +Check out additional configuration options with the [tryCatch](/platforms/javascript/configuration/integrations/trycatch/) and [ReportingObserver](/platforms/javascript/configuration/integrations/reportingobserver/) integrations. ### Other SDKs diff --git a/src/includes/platforms/configuration/integrations/custom.mdx b/src/includes/platforms/configuration/integrations/custom.mdx index bb0b8d6be00a1..7c9089fd4047d 100644 --- a/src/includes/platforms/configuration/integrations/custom.mdx +++ b/src/includes/platforms/configuration/integrations/custom.mdx @@ -1,8 +1,14 @@ -Add a custom integration to your JavaScript using the following format: +Add a custom integration to your JavaScript using the following format ```javascript -// All integrations that come with an SDK can be found on Sentry.Integrations object -// Custom integration must conform to the Integration interface: https://github.com/getsentry/sentry-javascript/blob/master/packages/types/src/integration.ts +class MyAwesomeIntegrations { + static id = "MyAwesomeIntegration"; + name = "MyAwesomeIntegration"; + + setupOnce() { + // Do something when the integration is initialized + } +} Sentry.init({ // ... diff --git a/src/includes/platforms/configuration/integrations/requestdata.mdx b/src/includes/platforms/configuration/integrations/requestdata.mdx new file mode 100644 index 0000000000000..b48522c0bc02d --- /dev/null +++ b/src/includes/platforms/configuration/integrations/requestdata.mdx @@ -0,0 +1,36 @@ +_Import name: `Sentry.Integrations.RequestData`_ + +This integration adds data from incoming requests to transaction and error events that occur during request handling done by the backend. + + + Please note that this integration is only available on the server. + + +## Options: + +- `include` (object) + +Controls what types of data are added to the event: + +```js +{ + cookies: boolean // default: true, + data: boolean // default: true, + headers: boolean // default: true, + ip: boolean // default: false, + query_string: boolean // default: true, + url: boolean // default: true, + user: boolean | { + id: boolean // default: true, + username: boolean // default: true, + email: boolean // default: true, + }, +} +``` + +- `transactionNamingSchema` (string) + +Controls how the transaction will be reported. Options are 'path' (`/some/route`), +'methodPath' (`GET /some/route`), and 'handler' (the name of the route handler +function, if available). +Defaults to `methodPath` diff --git a/src/includes/platforms/configuration/options/allow-urls.mdx b/src/includes/platforms/configuration/options/allow-urls.mdx new file mode 100644 index 0000000000000..7bcd4851d6781 --- /dev/null +++ b/src/includes/platforms/configuration/options/allow-urls.mdx @@ -0,0 +1 @@ +A list of strings or regex patterns that match error URLs which should exclusively be sent to Sentry. If you use this option, only errors whose entire file URL contains (string) or matches (regex) at least one entry in the list will be sent. As a result, if you add `'foo.com'` to it, it will also match on `https://bar.com/myfile/foo.com`. Keep in mind that this only applies for captured exceptions, not raw message events. By default, all errors are sent. diff --git a/src/includes/platforms/configuration/options/deny-urls.mdx b/src/includes/platforms/configuration/options/deny-urls.mdx new file mode 100644 index 0000000000000..fe18418a4f494 --- /dev/null +++ b/src/includes/platforms/configuration/options/deny-urls.mdx @@ -0,0 +1 @@ +A list of strings or regex patterns that match error URLs that should not be sent to Sentry. Errors whose entire file URL contains (string) or matches (regex) at least one entry in the list will not be sent. As a result, if you add `'foo.com'` to the list, it will also match on `https://bar.com/myfile/foo.com`. Keep in mind that this only applies for captured exceptions, not raw message events. By default, all errors are sent. diff --git a/src/includes/platforms/configuration/options/ignore-errors.mdx b/src/includes/platforms/configuration/options/ignore-errors.mdx new file mode 100644 index 0000000000000..3fda1d5235939 --- /dev/null +++ b/src/includes/platforms/configuration/options/ignore-errors.mdx @@ -0,0 +1 @@ +A list of strings or regex patterns that match error messages that shouldn't be sent to Sentry. Messages that match these strings or regular expressions will be filtered out before they're sent to Sentry. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead. By default, all errors are sent. diff --git a/src/includes/platforms/configuration/options/ignore-transactions.mdx b/src/includes/platforms/configuration/options/ignore-transactions.mdx new file mode 100644 index 0000000000000..25ad2bae05da3 --- /dev/null +++ b/src/includes/platforms/configuration/options/ignore-transactions.mdx @@ -0,0 +1 @@ +A list of strings or regex patterns that match transaction names that shouldn't be sent to Sentry. Transactions that match these strings or regular expressions will be filtered out before they're sent to Sentry. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead. By default, transactions spanning typical API health check requests are filtered out. diff --git a/src/platform-includes/configuration/capture-console/javascript.mdx b/src/platform-includes/configuration/capture-console/javascript.mdx index 856f89a62426f..372c135926906 100644 --- a/src/platform-includes/configuration/capture-console/javascript.mdx +++ b/src/platform-includes/configuration/capture-console/javascript.mdx @@ -2,17 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { CaptureConsole as CaptureConsoleIntegration } from "@sentry/integrations"; +import { CaptureConsole } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new CaptureConsoleIntegration( - { - // array of methods that should be captured - // defaults to ['log', 'info', 'warn', 'error', 'debug', 'assert'] - levels: string[]; - } - )], + integrations: [new CaptureConsole()], }); ``` @@ -28,15 +22,9 @@ Sentry.init({ > @@ -57,13 +45,7 @@ Sentry.init({ ``` diff --git a/src/platform-includes/configuration/contextlines/javascript.mdx b/src/platform-includes/configuration/contextlines/javascript.mdx index 0a949d0b8a062..183a23f5c3c51 100644 --- a/src/platform-includes/configuration/contextlines/javascript.mdx +++ b/src/platform-includes/configuration/contextlines/javascript.mdx @@ -6,13 +6,7 @@ import { ContextLines } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [ - new ContextLines({ - // The number of lines to collect around each stack frame's line number - // Defaults to 7 - frameContextLines: 7, - }), - ], + integrations: [new ContextLines()], }); ``` @@ -30,13 +24,7 @@ Sentry.init({ @@ -57,13 +45,7 @@ Sentry.init({ ``` diff --git a/src/platform-includes/configuration/debug/javascript.mdx b/src/platform-includes/configuration/debug/javascript.mdx index 90645c2c72c80..e2781ec84ebb8 100644 --- a/src/platform-includes/configuration/debug/javascript.mdx +++ b/src/platform-includes/configuration/debug/javascript.mdx @@ -2,19 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { Debug as DebugIntegration } from "@sentry/integrations"; +import { Debug } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new DebugIntegration( - { - // trigger DevTools debugger instead of using console.log - debugger: boolean; - - // stringify event before passing it to console.log - stringify: boolean; - } - )], + integrations: [new Debug()], }); ``` @@ -30,17 +22,9 @@ Sentry.init({ > @@ -61,15 +45,7 @@ Sentry.init({ ``` diff --git a/src/platform-includes/configuration/dedupe/javascript.mdx b/src/platform-includes/configuration/dedupe/javascript.mdx index 297afbfd9d942..54c6f4929e057 100644 --- a/src/platform-includes/configuration/dedupe/javascript.mdx +++ b/src/platform-includes/configuration/dedupe/javascript.mdx @@ -2,11 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { Dedupe as DedupeIntegration } from "@sentry/integrations"; +import { Dedupe } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new DedupeIntegration()], + integrations: [new Dedupe()], }); ``` diff --git a/src/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx b/src/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx index 738d6a094edf3..cc6847e8f6c59 100644 --- a/src/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx +++ b/src/platform-includes/configuration/enable-pluggable-integrations-lazy/javascript.mdx @@ -2,7 +2,7 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { ReportingObserver as ReportingObserverIntegration } from "@sentry/integrations"; +import { ReportingObserver } from "@sentry/integrations"; Sentry.init({ integrations: [], @@ -10,7 +10,7 @@ Sentry.init({ const client = Sentry.getCurrentHub().getClient(); if (client) { - client.addIntegration(new ReportingObserverIntegration()); + client.addIntegration(new ReportingObserver()); } ``` diff --git a/src/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx b/src/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx index bfda1a4b4bca2..01ba9e2ec3f4c 100644 --- a/src/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx +++ b/src/platform-includes/configuration/enable-pluggable-integrations/javascript.mdx @@ -2,11 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { ReportingObserver as ReportingObserverIntegration } from "@sentry/integrations"; +import { ReportingObserver } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new ReportingObserverIntegration()], + integrations: [new ReportingObserver()], }); ``` diff --git a/src/platform-includes/configuration/extra-error-data/javascript.mdx b/src/platform-includes/configuration/extra-error-data/javascript.mdx index 7b3ef6f49db4b..e7ccf7ae6e1e9 100644 --- a/src/platform-includes/configuration/extra-error-data/javascript.mdx +++ b/src/platform-includes/configuration/extra-error-data/javascript.mdx @@ -2,18 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { ExtraErrorData as ExtraErrorDataIntegration } from "@sentry/integrations"; +import { ExtraErrorData } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [ - new ExtraErrorDataIntegration({ - // 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. - depth: number, - }), - ], + integrations: [new ExtraErrorData()], }); ``` @@ -31,14 +24,7 @@ Sentry.init({ @@ -59,14 +45,7 @@ Sentry.init({ ``` diff --git a/src/platform-includes/configuration/http-client/javascript.mdx b/src/platform-includes/configuration/http-client/javascript.mdx index 441e64e3728fa..240cf0707147d 100644 --- a/src/platform-includes/configuration/http-client/javascript.mdx +++ b/src/platform-includes/configuration/http-client/javascript.mdx @@ -2,25 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { HttpClient as HttpClientIntegration } from "@sentry/integrations"; +import { HttpClient } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [ - new HttpClientIntegration({ - // This array can contain tuples of `[begin, end]` (both inclusive), - // single status codes, or a combination of both. - // default: [[500, 599]] - failedRequestStatusCodes: [[500, 505], 507], - - // This array can contain Regexes, strings, or a combination of both. - // default: [/.*/] - failedRequestTargets: [ - "http://example.com/api/test", - /(staging\.)?mypage\.com/, - ], - }), - ], + integrations: [new HttpClient()], // This option is required for capturing headers and cookies. sendDefaultPii: true, @@ -41,21 +27,7 @@ Sentry.init({ + + +``` + +```html {tabTitle: CDN} + + + +``` diff --git a/src/platform-includes/configuration/reporting-observer/javascript.mdx b/src/platform-includes/configuration/reporting-observer/javascript.mdx index 6a33b5c9ee6ee..01ba9e2ec3f4c 100644 --- a/src/platform-includes/configuration/reporting-observer/javascript.mdx +++ b/src/platform-includes/configuration/reporting-observer/javascript.mdx @@ -2,15 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { ReportingObserver as ReportingObserverIntegration } from "@sentry/integrations"; +import { ReportingObserver } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new ReportingObserverIntegration( - { - types: <'crash'|'deprecation'|'intervention'>[]; - } - )], + integrations: [new ReportingObserver()], }); ``` @@ -26,13 +22,9 @@ Sentry.init({ > @@ -53,11 +45,7 @@ Sentry.init({ ``` diff --git a/src/platform-includes/configuration/rewrite-frames/javascript.mdx b/src/platform-includes/configuration/rewrite-frames/javascript.mdx index 4f8e694dd497d..84a35075df616 100644 --- a/src/platform-includes/configuration/rewrite-frames/javascript.mdx +++ b/src/platform-includes/configuration/rewrite-frames/javascript.mdx @@ -2,22 +2,11 @@ ```javascript {tabTitle: ESM} import * as Sentry from "@sentry/browser"; -import { RewriteFrames as RewriteFramesIntegration } from "@sentry/integrations"; +import { RewriteFrames } from "@sentry/integrations"; Sentry.init({ dsn: "___PUBLIC_DSN___", - integrations: [new RewriteFramesIntegration( - { - // root path that will be stripped from the current frame's filename by the default iteratee if the filename is an absolute path - root: string; - - // a custom prefix that will be used by the default iteratee (default: `app://`) - prefix: string; - - // function that takes the frame, applies a transformation, and returns it - iteratee: (frame) => frame; - } - )], + integrations: [new RewriteFrames()], }); ``` @@ -33,22 +22,9 @@ Sentry.init({ > @@ -69,30 +45,7 @@ Sentry.init({ ``` - -#### Usage Examples - -For example, if the full path to your file is `/www/src/app/file.js`: - -| Usage | Path in Stack Trace | Description | -| --------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -| `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. | diff --git a/src/platform-includes/sourcemaps/legacy-troubleshooting/javascript.mdx b/src/platform-includes/sourcemaps/legacy-troubleshooting/javascript.mdx index 2ec6bb3b92477..08fdf3d04c06e 100644 --- a/src/platform-includes/sourcemaps/legacy-troubleshooting/javascript.mdx +++ b/src/platform-includes/sourcemaps/legacy-troubleshooting/javascript.mdx @@ -56,7 +56,7 @@ To verify that the distribution has been set correctly in the SDK, open an issue If you've uploaded source maps and they aren't applying to your code in an issue in Sentry, take a look at the JSON of the event and look for the `abs_path` to see exactly where we're attempting to resolve the file - for example, `http://localhost:8000/scripts/script.js` (`abs_path` will appear once for each frame in the stack trace - match this up with the file(s) that are not deminified.). A link to the JSON view can be found at the top of the issue page next to the date the event occurred. The uploaded artifact names must match these values. -If you have **dynamic values in your path** (for example, `https://www.site.com/{some_value}/scripts/script.js`), you may want to use the `rewriteFrames` integration`rewriteFrames` integration to change your `abs_path` values. +If you have **dynamic values in your path** (for example, `https://www.site.com/{some_value}/scripts/script.js`), you may want to use the `rewriteFrames` integration`rewriteFrames` integration to change your `abs_path` values. ### Using sentry-cli diff --git a/src/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx b/src/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx index 7a8b2c64eaec0..6ebd89214e98a 100644 --- a/src/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx +++ b/src/platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx @@ -306,7 +306,7 @@ To verify that the distribution has been set correctly in the SDK, open an issue If you've uploaded source maps and they aren't applying to your code in an issue in Sentry, take a look at the JSON of the event and look for the `abs_path` to see exactly where we're attempting to resolve the file - for example, `http://localhost:8000/scripts/script.js` (`abs_path` will appear once for each frame in the stack trace - match this up with the file(s) that are not deminified.). A link to the JSON view can be found at the top of the issue page next to the date the event occurred. The uploaded artifact names must match these values. -If you have **dynamic values in your path** (for example, `https://www.site.com/{some_value}/scripts/script.js`), you may want to use the `rewriteFrames` integration`rewriteFrames` integration to change your `abs_path` values. +If you have **dynamic values in your path** (for example, `https://www.site.com/{some_value}/scripts/script.js`), you may want to use the `rewriteFrames` integration`rewriteFrames` integration to change your `abs_path` values. #### Using sentry-cli diff --git a/src/platforms/common/configuration/options.mdx b/src/platforms/common/configuration/options.mdx index 49509568b90fd..b2bb7208667bf 100644 --- a/src/platforms/common/configuration/options.mdx +++ b/src/platforms/common/configuration/options.mdx @@ -282,25 +282,25 @@ For ASP.NET and ASP.NET Core applications, the value will default to the server' -A list of strings or regex patterns that match error messages that shouldn't be sent to Sentry. Messages that match these strings or regular expressions will be filtered out before they're sent to Sentry. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead. By default, all errors are sent. + -A list of strings or regex patterns that match transaction names that shouldn't be sent to Sentry. Transactions that match these strings or regular expressions will be filtered out before they're sent to Sentry. When using strings, partial matches will be filtered out, so if you need to filter by exact match, use regex patterns instead. By default, all transactions are sent. + -A list of strings or regex patterns that match error URLs that should not be sent to Sentry. Errors whose entire file URL contains (string) or matches (regex) at least one entry in the list will not be sent. As a result, if you add `'foo.com'` to the list, it will also match on `https://bar.com/myfile/foo.com`. By default, all errors are sent. + -A list of strings or regex patterns that match error URLs which should exclusively be sent to Sentry. If you use this option, only errors whose entire file URL contains (string) or matches (regex) at least one entry in the list will be sent. As a result, if you add `'foo.com'` to it, it will also match on `https://bar.com/myfile/foo.com`. By default, all errors are sent. + diff --git a/src/platforms/common/data-management/sensitive-data/index.mdx b/src/platforms/common/data-management/sensitive-data/index.mdx index 1a03b2b57dd68..406916a0c8e9f 100644 --- a/src/platforms/common/data-management/sensitive-data/index.mdx +++ b/src/platforms/common/data-management/sensitive-data/index.mdx @@ -99,6 +99,6 @@ As a best practice you should always avoid logging confidential information. If - Anonymize the confidential information within the log statements (for example, swap out email addresses -> for internal identifiers) - Use to filter it out from breadcrumbs before it is attached -- Disable logging breadcrumb integration (for example, as described [here](/platforms/javascript/configuration/integrations/default/#breadcrumbs)) +- Disable logging breadcrumb integration (for example, as described [here](/platforms/javascript/configuration/integrations/breadcrumbs/)) diff --git a/src/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx b/src/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx new file mode 100644 index 0000000000000..1c4190fd8fef7 --- /dev/null +++ b/src/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx @@ -0,0 +1,55 @@ +--- +title: Breadcrumbs +excerpt: "" +description: "Wraps native APIs to capture breadcrumbs. (default)" +sidebar_order: 1 +notSupported: + - javascript.electron +--- + +_Import name: `Sentry.Integrations.Breadcrumbs`_ + +This integration is [enabled by default](./../#modifying-default-integrations). + +This integration wraps native APIs to capture breadcrumbs. By default, the Sentry SDK wraps all APIs. +You can opt-out of capturing breadcrumbs for specific parts of your application (e.g. do not capture `console.log` calls as breadcrumbs) via the options below. + +## Options + +### `console` + +_Type: `boolean`_ + +Log calls to `console.log`, `console.debug`, etc. + +### `dom` + +_Type: `boolean` | `{ serializeAttribute: string | string[] }`_ + +Log all click and keypress events. + +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` + +_Type: `boolean`_ + +Log HTTP requests done with the Fetch API + +### `history` + +_Type: `boolean`_ + +Log calls to `history.pushState` and related APIs. + +### `sentry` + +_Type: `boolean`_ + +Log whenever we send an event to the server. + +### `xhr` + +_Type: `boolean`_ + +Log HTTP requests done with the XHR API. diff --git a/src/platforms/javascript/common/configuration/integrations/browsertracing.mdx b/src/platforms/javascript/common/configuration/integrations/browsertracing.mdx new file mode 100644 index 0000000000000..7d5ba1b3c68d0 --- /dev/null +++ b/src/platforms/javascript/common/configuration/integrations/browsertracing.mdx @@ -0,0 +1,14 @@ +--- +title: BrowserTracing +excerpt: "" +description: "Capture performance data for the Browser." +sidebar_order: 99 +notSupported: + - javascript.cordova +--- + +With [performance monitoring](/product/performance/), Sentry tracks your software performance, measuring metrics like throughput and latency, and displaying the impact of errors across multiple systems. Sentry captures distributed traces consisting of transactions and spans, which measure individual services and individual operations within those services. + +The BrowserTracing integration sets up automatic performance monitoring for your frontend applications. It captures transactions and spans from the browser and sends them to Sentry. + +Read more about [setting up BrowserTracing](./../../../performance/). diff --git a/src/platforms/javascript/common/configuration/integrations/captureconsole.mdx b/src/platforms/javascript/common/configuration/integrations/captureconsole.mdx new file mode 100644 index 0000000000000..ffc212e020e5b --- /dev/null +++ b/src/platforms/javascript/common/configuration/integrations/captureconsole.mdx @@ -0,0 +1,21 @@ +--- +title: CaptureConsole +excerpt: "" +description: "Captures all Console API calls via `captureException` or `captureMessage`." +sidebar_order: 100 +--- + +This integration captures all Console API calls and redirects them to Sentry using the SDK's captureMessage or captureException call, depending on the log level. It then re-triggers to preserve default native behavior: + +This integration requires you to install `@sentry/integrations` next to your main SDK package. + + + +## Options + +### `levels` + +_Type: `string[]`_ + +Array of methods that should be captured. +Defaults to `['log', 'info', 'warn', 'error', 'debug', 'assert']` diff --git a/src/platforms/javascript/common/configuration/integrations/contextlines.mdx b/src/platforms/javascript/common/configuration/integrations/contextlines.mdx new file mode 100644 index 0000000000000..3c630ef07994d --- /dev/null +++ b/src/platforms/javascript/common/configuration/integrations/contextlines.mdx @@ -0,0 +1,25 @@ +--- +title: ContextLines +excerpt: "" +description: "Adds source code from inline JavaScript of the current page's HTML." +sidebar_order: 100 +--- + +_Import name: `Sentry.Integrations.ContextLines`_ + +This integration adds source code from inline JavaScript of the current page's HTML (e.g. JS in `