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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ supported:

<Alert level="info">

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

</Alert>

Expand All @@ -35,3 +35,14 @@ _Import name: `Sentry.amqplibIntegration`_
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).

The `amqplibIntegration` adds instrumentation for the `amqplib` library to capture spans using [`@opentelemetry/instrumentation-amqplib`](https://www.npmjs.com/package/@opentelemetry/instrumentation-amqplib).

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [new Sentry.amqplibIntegration()],
});
```

## Supported Versions

- `amqplib`: `>=0.5.5 <1`
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ This integration only works in the Node.js runtime.
_Import name: `Sentry.anrIntegration`_

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).

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.anrIntegration({ captureStackTrace: true })],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ _Import name: `Sentry.awsIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

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).

```JavaScript
import * as Sentry from '@sentry/aws-serverless';

Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.awsIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ _Import name: `Sentry.awsLambdaIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

Adds instrumentation for AWS Lambda to automatically create spans. Powered by [`@opentelemetry/instrumentation-aws-lambda`](https://www.npmjs.com/package/@opentelemetry/instrumentation-aws-lambda).

```JavaScript
import * as Sentry from '@sentry/aws-serverless';

Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.awsIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ By default, the Sentry SDK wraps the `console`, `dom`, `fetch`, `history`, and `

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [
Sentry.breadcrumbsIntegration({
console: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This integration wraps native time and event APIs (`setTimeout`, `setInterval`,

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would honestly not add the DSN here (and all the other snippets). It is not relevant to the snippet and it will create an ugly banner on top of the snippet if you are not logged in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It also looks like you left it out in some places. Should we do all or nothing? I'd go for "nothing")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah let's go for nothing - I agree!

integrations: [
Sentry.browserApiErrorsIntegration({
setTimeout: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ _Import name: `Sentry.browserProfilingIntegration`_
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.

Read more about [setting up BrowserProfiling](./../../../profiling/).

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [new Sentry.browserProfilingIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ With [tracing](/product/performance/), Sentry tracks your software performance,
The BrowserTracing integration sets up automatic tracing for your frontend applications. It captures transactions and spans from the browser and sends them to Sentry.

Read more about [setting up BrowserTracing](./../../../tracing/).

```JavaScript
Sentry.init({
integrations: [new Sentry.browserTracingIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ _Import name: `Sentry.bunServerIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

The `bunServerIntegration` instruments [`Bun.serve` API](https://bun.sh/docs/api/http) to automatically create transactions and capture errors.

```JavaScript
import * as Sentry from '@sentry/bun';

Sentry.init({
integrations: [new Sentry.bunServerIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ The `connectIntegration` adds instrumentation for the Hapi framework to capture

## Supported Versions

- Connect `^3.0.0`
- `connect`: `^3.0.0`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No init snippet here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I need to add them for all the server frameworks, just missed this

Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ _Import name: `Sentry.consoleIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

The `consoleIntegration` generates breadcrumbs for console logs.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.consoleIntegration()],
});
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Dataloader
description: "Adds instrumentation for Dataloader. (default)"
description: "Adds instrumentation for Dataloader."
supported:
- javascript.node
- javascript.aws-lambda
Expand Down Expand Up @@ -29,10 +29,14 @@ This integration only works in the Node.js and Bun runtimes. Requires SDK versio

_Import name: `Sentry.dataloaderIntegration`_

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).

The `dataloaderIntegration` adds instrumentation for the `dataloader` library to capture spans using [`@opentelemetry/instrumentation-dataloader`](https://www.npmjs.com/package/@opentelemetry/instrumentation-dataloader).

```javascript
Sentry.init({
integrations: [new Sentry.dataloaderIntegration()],
});
```

## Supported Versions

- `dataloader`: `>=2.0.0 <3`
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ _Import name: `Sentry.denoContextIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

Adds Deno related context to events. This includes contexts about `app`, `device`, `os`, `v8`, and `TypeScript`.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.denoContextIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ _Import name: `Sentry.denoCronIntegration`_
The DenoCron integration sets up automatic monitoring for your cron jobs created by [`Deno.cron`](https://docs.deno.com/deploy/kv/manual/cron). It captures check-ins and sends them to Sentry.

Read more about [setting up Cron Monitoring for Deno](./../../../crons/).

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.denoCronIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ The `fsIntegration` creates spans for `fs` API operations, like reading and writ
down your application.
</Alert>

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.fsIntegration()],
});
```

## Options

### `recordFilePaths`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ _Import name: `Sentry.functionToStringIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

This integration allows the SDK to provide original functions and method names, even when those functions or methods are wrapped by our error or breadcrumb handlers.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.functionToStringIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ This integration is enabled by default when performance monitoring is enabled. I

The `genericPoolIntegration` adds instrumentation for the `generic-pool` library to capture spans using [`@opentelemetry/instrumentation-generic-pool`](https://www.npmjs.com/package/@opentelemetry/instrumentation-generic-pool).

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.genericPoolIntegration()],
});
```

## Supported Versions

- `generic-pool`: `>=2.0.0 <4`
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ This integration is enabled by default. If you'd like to modify your default int

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

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.globalHandlersIntegration({ onerror: true, onunhandledrejection: true })],
});
```

## Options

### `onerror`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ _Import name: `Sentry.googleCloudGrpcIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

Adds instrumentation for GRPC APIs on Google Cloud to automatically create spans.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.googleCloudGrpcIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ _Import name: `Sentry.googleCloudHttpIntegration`_
This integration is enabled by default. If you'd like to modify your default integrations, read [this](./../#modifying-default-integrations).

Adds instrumentation for RESTful APIs on Google Cloud to automatically create spans.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.googleCloudHttpIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ This integration is enabled by default when performance monitoring is enabled. I

The `graphqlIntegration` adds instrumentation for the `graphql` library to capture spans using [`@opentelemetry/instrumentation-graphql`](https://www.npmjs.com/package/@opentelemetry/instrumentation-graphql).

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.graphqlIntegration()],
});
```

## Supported Versions

- `graphql`: `>=14.0.0 <17`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ The `httpIntegration` does two things:
1. It captures breadcrumbs for HTTP requests.
2. It captures spans for outgoing HTTP requests.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.httpIntegration()],
});
```

## Options

### `breadcrumbs`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ This integration is enabled by default. If you'd like to modify your default int

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.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.httpContextIntegration()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ This integration is enabled by default when performance monitoring is enabled. I

The `kafkaIntegration` adds instrumentation for the `kafkajs` library to capture spans using [`@opentelemetry/instrumentation-kafkajs`](https://www.npmjs.com/package/@opentelemetry/instrumentation-kafkajs).

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.kafkaIntegration()],
});
```

## Supported Versions

- `kafkajs`: `>=0.1.0 <3`
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Knex
description: "Adds instrumentation for Knex."
supported:
- javascript.node
- javascript.aws-lambda
- javascript.azure-functions
- javascript.connect
- javascript.express
- javascript.fastify
- javascript.gcp-functions
- javascript.hapi
- javascript.koa
- javascript.nestjs
- javascript.electron
- javascript.nextjs
- javascript.nuxt
- javascript.sveltekit
- javascript.remix
- javascript.astro
- javascript.bun
---

<Alert level="info">

This integration only works in the Node.js and Bun runtimes. Requires SDK version `8.38.0` or higher.

</Alert>

_Import name: `Sentry.knexIntegration`_

The `knexIntegration` adds instrumentation for the `dataloader` library to capture spans using [`@opentelemetry/instrumentation-knex`](https://www.npmjs.com/package/@opentelemetry/instrumentation-knex).

```javascript
Sentry.init({
integrations: [new Sentry.knexIntegration()],
});
```

## Supported Versions

- `dataloader`: `>=0.10.0 <4`
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ This integration is enabled by default. If you'd like to modify your default int

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"`.

```JavaScript
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.linkedErrorsIntegration()],
});
```

## Options

### `key`
Expand Down
Loading
Loading