Skip to content
Merged
Changes from all commits
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
21 changes: 13 additions & 8 deletions packages/cloudflare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,21 @@ To get started, first install the `@sentry/cloudflare` package:
npm install @sentry/cloudflare
```

Then set either the `nodejs_compat` or `nodejs_als` compatibility flags in your `wrangler.toml`. This is because the SDK
needs access to the `AsyncLocalStorage` API to work correctly.

```toml
compatibility_flags = ["nodejs_compat"]
# compatibility_flags = ["nodejs_als"]
Then either set the `nodejs_als` or `nodejs_compat` compatibility flags in your `wrangler.jsonc`/`wrangler.toml` config. This is because the SDK needs access to the `AsyncLocalStorage` API to work correctly.

```jsonc {tabTitle:JSON} {filename:wrangler.jsonc}
{
"compatibility_flags": [
"nodejs_als"
// "nodejs_compat"
]
}
```

Then you can either setup up the SDK for [Cloudflare Pages](#setup-cloudflare-pages) or
[Cloudflare Workers](#setup-cloudflare-workers).
```toml {tabTitle:Toml} {filename:wrangler.toml}
compatibility_flags = ["nodejs_als"]
# compatibility_flags = ["nodejs_compat"]
```

## Setup (Cloudflare Pages)

Expand Down
Loading