diff --git a/packages/cloudflare/README.md b/packages/cloudflare/README.md index de54f5351332..99e2a91b8cf0 100644 --- a/packages/cloudflare/README.md +++ b/packages/cloudflare/README.md @@ -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)