Skip to content

Commit

Permalink
add extra readme context
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Jul 29, 2024
1 parent dd64099 commit 5671b7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cloudflare/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ 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`:
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"]
Expand All @@ -46,6 +47,7 @@ import * as Sentry from '@sentry/cloudflare';
export default withSentry(
(env) => ({
dsn: env.SENTRY_DSN,
// Set tracesSampleRate to 1.0 to capture 100% of spans for tracing.
tracesSampleRate: 1.0,
}),
{
Expand Down

0 comments on commit 5671b7b

Please sign in to comment.