Skip to content

Commit e303818

Browse files
authored
feat(js): Re-org js integrations and add missing node integrations (#11799)
1. Add Sentry.init snippets to all relevant node integrations 2. Add supported versions where missing in node integrations 3. Add node integration entries for dataloader, knex, and lrumemorizer integrations 4. Make sure dataloader is not marked as default 5. Alpha-order and add missing entries to js integrations table
1 parent bbeba13 commit e303818

Some content is hidden

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

69 files changed

+1245
-687
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ supported:
2626

2727
<Alert level="info">
2828

29-
This integration only works inside server environments (Node.js, Bun, Deno). Requires SDK version `8.32.0` or higher.
29+
This integration only works in the Node.js and Bun runtimes. Requires SDK version `8.32.0` or higher.
3030

3131
</Alert>
3232

@@ -35,3 +35,13 @@ _Import name: `Sentry.amqplibIntegration`_
3535
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).
3636

3737
The `amqplibIntegration` adds instrumentation for the `amqplib` library to capture spans using [`@opentelemetry/instrumentation-amqplib`](https://www.npmjs.com/package/@opentelemetry/instrumentation-amqplib).
38+
39+
```JavaScript
40+
Sentry.init({
41+
integrations: [new Sentry.amqplibIntegration()],
42+
});
43+
```
44+
45+
## Supported Versions
46+
47+
- `amqplib`: `>=0.5.5 <1`

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,9 @@ This integration only works in the Node.js runtime.
3030
_Import name: `Sentry.anrIntegration`_
3131

3232
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).
33+
34+
```JavaScript
35+
Sentry.init({
36+
integrations: [Sentry.anrIntegration({ captureStackTrace: true })],
37+
});
38+
```

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ _Import name: `Sentry.awsIntegration`_
1010
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
1111

1212
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).
13+
14+
```JavaScript
15+
import * as Sentry from '@sentry/aws-serverless';
16+
17+
Sentry.init({
18+
integrations: [Sentry.awsIntegration()],
19+
});
20+
```

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ _Import name: `Sentry.awsLambdaIntegration`_
1010
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
1111

1212
Adds instrumentation for AWS Lambda to automatically create spans. Powered by [`@opentelemetry/instrumentation-aws-lambda`](https://www.npmjs.com/package/@opentelemetry/instrumentation-aws-lambda).
13+
14+
```JavaScript
15+
import * as Sentry from '@sentry/aws-serverless';
16+
17+
Sentry.init({
18+
integrations: [Sentry.awsIntegration()],
19+
});
20+
```

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ _Import name: `Sentry.browserProfilingIntegration`_
3131
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.
3232

3333
Read more about [setting up BrowserProfiling](./../../../profiling/).
34+
35+
```JavaScript
36+
Sentry.init({
37+
integrations: [new Sentry.browserProfilingIntegration()],
38+
});
39+
```

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ With [tracing](/product/performance/), Sentry tracks your software performance,
3131
The BrowserTracing integration sets up automatic tracing for your frontend applications. It captures transactions and spans from the browser and sends them to Sentry.
3232

3333
Read more about [setting up BrowserTracing](./../../../tracing/).
34+
35+
```JavaScript
36+
Sentry.init({
37+
integrations: [new Sentry.browserTracingIntegration()],
38+
});
39+
```

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ _Import name: `Sentry.bunServerIntegration`_
1616
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
1717

1818
The `bunServerIntegration` instruments [`Bun.serve` API](https://bun.sh/docs/api/http) to automatically create transactions and capture errors.
19+
20+
```JavaScript
21+
import * as Sentry from '@sentry/bun';
22+
23+
Sentry.init({
24+
integrations: [new Sentry.bunServerIntegration()],
25+
});
26+
```

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ This integration is enabled by default when performance monitoring is enabled. I
2020

2121
The `connectIntegration` adds instrumentation for the Hapi framework to capture spans using [`@opentelemetry/instrumentation-connect`](https://www.npmjs.com/package/@opentelemetry/instrumentation-connect).
2222

23+
```JavaScript
24+
Sentry.init({
25+
integrations: [new Sentry.connectIntegration()],
26+
});
27+
```
28+
2329
## Supported Versions
2430

25-
- Connect `^3.0.0`
31+
- `connect`: `^3.0.0`

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ _Import name: `Sentry.consoleIntegration`_
3636
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).
3737

3838
The `consoleIntegration` generates breadcrumbs for console logs.
39+
40+
```JavaScript
41+
Sentry.init({
42+
integrations: [Sentry.consoleIntegration()],
43+
});
44+
```

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Dataloader
3-
description: "Adds instrumentation for Dataloader. (default)"
3+
description: "Adds instrumentation for Dataloader."
44
supported:
55
- javascript.node
66
- javascript.aws-lambda
@@ -29,10 +29,14 @@ This integration only works in the Node.js and Bun runtimes. Requires SDK versio
2929

3030
_Import name: `Sentry.dataloaderIntegration`_
3131

32-
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).
33-
3432
The `dataloaderIntegration` adds instrumentation for the `dataloader` library to capture spans using [`@opentelemetry/instrumentation-dataloader`](https://www.npmjs.com/package/@opentelemetry/instrumentation-dataloader).
3533

34+
```javascript
35+
Sentry.init({
36+
integrations: [new Sentry.dataloaderIntegration()],
37+
});
38+
```
39+
3640
## Supported Versions
3741

3842
- `dataloader`: `>=2.0.0 <3`

0 commit comments

Comments
 (0)