Skip to content

Commit 6101daf

Browse files
authored
feat: Revamp JS integrations page for v8 (#10138)
1 parent 20742c1 commit 6101daf

File tree

83 files changed

+1659
-101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1659
-101
lines changed

docs/platforms/javascript/common/configuration/application-not-responding.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ supported:
1313
- javascript.hapi
1414
- javascript.koa
1515
- javascript.nestjs
16+
- javascript.electron
17+
- javascript.nextjs
18+
- javascript.sveltekit
19+
- javascript.remix
20+
- javascript.astro
1621
keywords:
1722
[
1823
"anr",
@@ -38,13 +43,11 @@ To enable ANR detection, add the `Anr` integration from the `@sentry/node` packa
3843

3944
<Alert level="info">
4045

41-
ANR detection requires Node 16 or higher.
46+
ANR detection requires Node 16 or higher and can only be used in the Node.js runtime.
4247

4348
</Alert>
4449

4550
```javascript
46-
import * as Sentry from "@sentry/node";
47-
4851
Sentry.init({
4952
dsn: "___PUBLIC_DSN___",
5053
integrations: [Sentry.anrIntegration({ captureStackTrace: true })],
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Anr
3+
description: "Capture context about the environment and the device that the client is running on, and add it to events. (default)"
4+
supported:
5+
- javascript.node
6+
- javascript.aws-lambda
7+
- javascript.azure-functions
8+
- javascript.connect
9+
- javascript.express
10+
- javascript.fastify
11+
- javascript.gcp-functions
12+
- javascript.hapi
13+
- javascript.koa
14+
- javascript.nestjs
15+
- javascript.electron
16+
- javascript.nextjs
17+
- javascript.sveltekit
18+
- javascript.remix
19+
- javascript.astro
20+
---
21+
22+
<Alert level="info">
23+
24+
This integration only works in the Node.js runtime.
25+
26+
</Alert>
27+
28+
_Import name: `Sentry.anrIntegration`_
29+
30+
The `anrIntegration` captures Application Not Responding (ANR)/Event Loop Stall errors and reports them as Sentry events. For more details, see the documentation on [ANR](../../application-not-responding).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Aws
3+
description: "Adds instrumentation for aws-sdk. (default)"
4+
supported:
5+
- javascript.aws-lambda
6+
---
7+
8+
_Import name: `Sentry.awsIntegration`_
9+
10+
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
11+
12+
Adds instrumentation for aws-sdk v2 and v3 to automatically create spans. Powered by [`@opentelemetry/instrumentation-aws-sdk`](https://www.npmjs.com/package/@opentelemetry/instrumentation-aws-sdk).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: AwsLambda
3+
description: "Adds instrumentation for AWS Lambda. (default)"
4+
supported:
5+
- javascript.aws-lambda
6+
---
7+
8+
_Import name: `Sentry.awsLambdaIntegration`_
9+
10+
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
11+
12+
Adds instrumentation for AWS Lambda to automatically create spans. Powered by [`@opentelemetry/instrumentation-aws-lambda`](https://www.npmjs.com/package/@opentelemetry/instrumentation-aws-lambda).

docs/platforms/javascript/common/configuration/integrations/breadcrumbs.mdx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Breadcrumbs
3-
description: "Wraps native APIs to capture breadcrumbs. (default)"
3+
description: "Wraps native browser APIs to capture breadcrumbs. (default)"
44
notSupported:
55
- javascript.node
66
- javascript.aws-lambda
@@ -13,18 +13,37 @@ notSupported:
1313
- javascript.hapi
1414
- javascript.koa
1515
- javascript.nestjs
16+
- javascript.deno
17+
- javascript.bun
1618
---
1719

1820
<Alert level="info">
19-
This integration only works inside a browser environment.
21+
22+
This integration only works inside a browser environment.
23+
2024
</Alert>
2125

2226
_Import name: `Sentry.breadcrumbsIntegration`_
2327

2428
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
2529

2630
The `breadcrumbsIntegration` wraps native APIs to capture breadcrumbs.
27-
By default, the Sentry SDK wraps all APIs. You can opt out of capturing breadcrumbs for specific parts of your application (for example, you could say don't capture `console.log` calls as breadcrumbs) via the options below.
31+
32+
By default, the Sentry SDK wraps the `console`, `dom`, fetch`, `history`, and `xhr`browser APIs to add breadcrumbs. You can opt out of capturing breadcrumbs for specific parts of your application (for example, you could say don't capture `console.log` calls as breadcrumbs) via the options below.
33+
34+
```JavaScript
35+
Sentry.init({
36+
integrations: [
37+
Sentry.breadcrumbsIntegration({
38+
console: true,
39+
dom: true,
40+
fetch: true,
41+
history: true,
42+
xhr: true,
43+
}),
44+
],
45+
});
46+
```
2847

2948
## Options
3049

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
title: BrowserApiErrors
3+
description: "Wraps native time and events APIs (`setTimeout`, `setInterval`, `requestAnimationFrame`, `addEventListener/removeEventListener`) in `try/catch` blocks to handle async exceptions. (default)"
4+
notSupported:
5+
- javascript.electron
6+
- javascript.node
7+
- javascript.aws-lambda
8+
- javascript.azure-functions
9+
- javascript.connect
10+
- javascript.express
11+
- javascript.fastify
12+
- javascript.gcp-functions
13+
- javascript.hapi
14+
- javascript.koa
15+
- javascript.nestjs
16+
- javascript.deno
17+
- javascript.bun
18+
---
19+
20+
<Alert level="info">
21+
22+
This integration only works inside a browser environment.
23+
24+
</Alert>
25+
26+
_Import name: `Sentry.browserApiErrorsIntegration`_
27+
28+
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
29+
30+
This integration wraps native time and event APIs (`setTimeout`, `setInterval`, `requestAnimationFrame`, `addEventListener/removeEventListener`) in `try/catch` blocks to handle async exceptions.
31+
32+
```JavaScript
33+
Sentry.init({
34+
integrations: [
35+
Sentry.browserApiErrorsIntegration({
36+
setTimeout: true;
37+
setInterval: true;
38+
requestAnimationFrame: true;
39+
XMLHttpRequest: true;
40+
eventTarget: true;
41+
}),
42+
],
43+
});
44+
```
45+
46+
## Options
47+
48+
### `setTimeout`
49+
50+
_Type: `boolean`_
51+
52+
Instrument the `setTimeout` browser built-in method.
53+
54+
### `setInterval`
55+
56+
_Type: `boolean`_
57+
58+
Instrument the `setInterval` browser built-in method.
59+
60+
### `requestAnimationFrame`
61+
62+
_Type: `boolean`_
63+
64+
Instrument the `requestAnimationFrame` browser built-in method.
65+
66+
### `XMLHttpRequest`
67+
68+
_Type: `boolean`_
69+
70+
Instrument the `XMLHttpRequest` browser built-in method.
71+
72+
### `eventTarget`
73+
74+
_Type: `boolean | string[]`_
75+
76+
Instrument the `addEventListener` browser built-in method for a set number of default event targets. To override the default event targets, provide an array of strings with the event target names.
77+
78+
List of default event targets:
79+
80+
- `EventTarget`
81+
- `Window`
82+
- `Node`
83+
- `ApplicationCache`
84+
- `AudioTrackList`
85+
- `BroadcastChannel`
86+
- `ChannelMergerNode`
87+
- `CryptoOperation`
88+
- `EventSource`
89+
- `FileReader`
90+
- `HTMLUnknownElement`
91+
- `IDBDatabase`
92+
- `IDBRequest`
93+
- `IDBTransaction`
94+
- `KeyOperation`
95+
- `MediaController`
96+
- `MessagePort`
97+
- `ModalWindow`
98+
- `Notification`
99+
- `SVGElementInstance`
100+
- `Screen`
101+
- `SharedWorker`
102+
- `TextTrack`
103+
- `TextTrackCue`
104+
- `TextTrackList`
105+
- `WebSocket`
106+
- `WebSocketWorker`
107+
- `Worker`
108+
- `XMLHttpRequest`
109+
- `XMLHttpRequestEventTarget`
110+
- `XMLHttpRequestUpload`
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
---
2-
title: BrowserProfiling
3-
description: "Collect & view performance insights for JavaScript programs with Sentry’s JavaScript Profiling integration."
2+
title: BrowserTracing
3+
description: "Capture profiling data for the Browser."
44
notSupported:
55
- javascript.cordova
6-
- javascript.wasm
7-
- javascript.bun
8-
- javascript.deno
96
- javascript.node
107
- javascript.aws-lambda
118
- javascript.azure-functions
@@ -16,14 +13,20 @@ notSupported:
1613
- javascript.hapi
1714
- javascript.koa
1815
- javascript.nestjs
16+
- javascript.deno
17+
- javascript.bun
1918
---
2019

2120
<Alert level="info">
22-
This integration only works inside a browser environment.
21+
22+
This integration only works inside a browser environment.
23+
2324
</Alert>
2425

2526
_Import name: `Sentry.browserProfilingIntegration`_
2627

27-
[Profiling](/product/profiling/) offers a deeper level of visibility on top of traditional tracing, removing the need for custom instrumentation and enabling precise code-level visibility into your application in a production environment.
28+
[Profiling](/product/profiling/), builds upon [Sentry Performance Monitoring](/product/performance/) to provide precise code-level visibility into browser application execution in a production environment.
29+
30+
The BrowserProfiling integration sets up automatic performance profiling for your frontend applications. It captures profiles via the [JS Self-Profiling API](https://wicg.github.io/js-self-profiling/) from the browser and sends them to Sentry. To use this integration, you also need to have the [BrowserTracing integration](./browsertracing) enabled.
2831

29-
Read more about <PlatformLink to='/profiling'>setting up Profiling</PlatformLink>.
32+
Read more about [setting up BrowserProfiling](./../../../profiling/).

docs/platforms/javascript/common/configuration/integrations/browsertracing.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ notSupported:
1313
- javascript.hapi
1414
- javascript.koa
1515
- javascript.nestjs
16+
- javascript.deno
17+
- javascript.bun
1618
---
1719

1820
<Alert level="info">
19-
This integration only works inside a browser environment.
21+
22+
This integration only works inside a browser environment.
23+
2024
</Alert>
2125

2226
_Import name: `Sentry.browserTracingIntegration`_
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: BunServer
3+
description: "Instruments Bun.serve to automatically create transactions and capture errors. (default)"
4+
supported:
5+
- javascript.bun
6+
---
7+
8+
<Alert level="info">
9+
10+
This integration only works in the Bun runtime.
11+
12+
</Alert>
13+
14+
_Import name: `Sentry.bunServerIntegration`_
15+
16+
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
17+
18+
The `bunServerIntegration` instruments [`Bun.serve` API](https://bun.sh/docs/api/http) to automatically create transactions and capture errors.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Connect
3+
description: "Adds performance instrumentation for Connect. (default)"
4+
supported:
5+
- javascript.node
6+
- javascript.hapi
7+
---
8+
9+
For more information on setting up Sentry Connect support, see the [Connect Sentry documentation](/platforms/javascript/guides/connect/).
10+
11+
<Alert level="info">
12+
13+
This integration only works in the Node.js and Bun runtimes.
14+
15+
</Alert>
16+
17+
_Import name: `Sentry.connectIntegration`_
18+
19+
This integration is enabled by default when performance monitoring is enabled. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
20+
21+
The `connectIntegration` adds instrumentation for the Hapi framework to capture spans using [`@opentelemetry/instrumentation-connect`](https://www.npmjs.com/package/@opentelemetry/instrumentation-connect).
22+
23+
## Supported Versions
24+
25+
- Connect `^3.0.0`

0 commit comments

Comments
 (0)