Open
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/cloudflare
SDK Version
9.35.0
Framework Version
Sveltekit 2.16.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
https://github.com/RaniSputnik/sentry-issues/tree/enable-not-a-function
Steps to Reproduce
- Follow the getting started guide for a new Sveltekit app, including using the Cloudflare adapter.
- Run
npx @sentry/wizard@latest -i sveltekit
- Follow Cloudflare + Sveltekit specific setup instructions
- Add a minimal
wrangler.toml
:
name = "some-project-name"
main = ".svelte-kit/cloudflare/_worker.js"
compatibility_date = "2025-01-01"
compatibility_flags = ["nodejs_compat"]
version_metadata = { binding = "CF_VERSION_METADATA" }
[assets]
binding = "assets"
directory = ".svelte-kit/cloudflare"
[observability]
enabled = true
head_sampling_rate = 1
Expected Result
My setup is functional. I can use the Sentry test error page to trigger client side + server side errors.

Actual Result
Symptom 1
I get intermittent 500's when trying to load the page with the following error in the logs:
TypeError: this.enable is not a function
at new InstrumentationBase (_worker.js:17457:16)
at new SentryHttpInstrumentation (_worker.js:28603:9)
at _worker.js:28871:16
at Object.assign.id (_worker.js:20577:31)
at Object.setupOnce (_worker.js:28892:11)
at setupIntegration (_worker.js:5979:17)
at _worker.js:5960:7
at Array.forEach (<anonymous>)
at setupIntegrations (_worker.js:5958:16)
at NodeClient._setupIntegrations (_worker.js:6576:30)

Symptom 2
I see 400's in the browser on every page load when posting to https://o447951.ingest.sentry.io:
{"detail":"bad sentry DSN public key","causes":["invalid project key"]}

Symptom 3
The Sentry example page raises and error client side and posts to an API route that also errors. It should produce two errors, one from the client and one from the server. Client errors are being reported, server errors are not:

Metadata
Metadata
Assignees
Type
Projects
Status
Waiting for: Product Owner