Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
},
],
},
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
},
],
},
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
},
],
},
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
},
],
},
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
},
],
},
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-instrument-fetcher",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["EchoHeadersDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-durable-objects",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-worker-do-rpc-disabled",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-worker-do-rpc",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-durable-objects",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "cloudflare-service-binding-sub-worker",
"main": "index-sub-worker.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-worker-service-binding",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"services": [
{
"binding": "ANOTHER_WORKER",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-worker-worker-do-rpc-sub",
"main": "index-sub-worker.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-worker-worker-do-rpc",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"services": [
{
"binding": "SUB_WORKER",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "cloudflare-worker-workerentrypoint-rpc-sub",
"main": "index-sub-worker.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-worker-workerentrypoint-rpc",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"services": [
{
"binding": "SUB_WORKER",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-workerentrypoint-do-rpc-disabled",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-workerentrypoint-do-rpc",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-workerentrypoint-workerentrypoint-do-rpc-sub",
"main": "index-sub-worker.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-workerentrypoint-workerentrypoint-do-rpc",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"services": [
{
"binding": "SUB_WORKER",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudflare-durable-objects",
"main": "index.ts",
"compatibility_date": "2025-06-17",
"compatibility_flags": ["nodejs_als"],
"compatibility_flags": ["nodejs_compat"],
"migrations": [
{
"new_sqlite_classes": ["MyDurableObject"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},

"upload_source_maps": true,
"compatibility_flags": ["nodejs_compat", "nodejs_als"],
"compatibility_flags": ["nodejs_compat"],

"durable_objects": {
"bindings": [{ "name": "MyAgent", "class_name": "MyAgent" }],
Expand Down
10 changes: 3 additions & 7 deletions packages/cloudflare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,16 @@ To get started, first install the `@sentry/cloudflare` package:
npm install @sentry/cloudflare
```

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.
Then set the `nodejs_compat` compatibility flag in your `wrangler.jsonc`/`wrangler.toml` config. This is because the SDK needs access to Node.js compatibility APIs to work correctly.

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

```toml {tabTitle:Toml} {filename:wrangler.toml}
compatibility_flags = ["nodejs_als"]
# compatibility_flags = ["nodejs_compat"]
compatibility_flags = ["nodejs_compat"]
```

## Setup (Cloudflare Pages)
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/src/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getDefaultCurrentScope, getDefaultIsolationScope, setAsyncContextStrate
* Sets the async context strategy to use AsyncLocalStorage.
*
* AsyncLocalStorage is only available in the cloudflare workers runtime if you set
* compatibility_flags = ["nodejs_compat"] or compatibility_flags = ["nodejs_als"]
* compatibility_flags = ["nodejs_compat"]
*
* @internal Only exported to be used in higher-level Sentry packages
* @hidden Only exported to be used in higher-level Sentry packages
Expand Down
Loading