Repository navigation
@sentry/sveltekit typescript types include unexported functions for Cloudflare Workers #24965
Description
Activity
Hey thanks for raising the issue. Do you have any specifics about which function is non-existing? We do have an E2E test in our repo that checks against workerd, just wondering if we missed something specific that lead to the crash.
- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Oct 2, 2026 Thanks for the quick reply. I encountered this specifically with
consoleLoggingIntegration, as shown in my example; it's not exported from https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/src/worker/index.ts. I was going to submit a pr to fix this, but I know some methods from core shouldn't be exposed to workers, and I was uncertain how best to handle the typing situation.I was going to submit a pr to fix this, but I know some methods from core shouldn't be exposed to workers, and I was uncertain how best to handle the typing situation.
I see now. You're right the types are wrong, if you want you can add the
consoleLoggingIntegrationthere. You don't have to deal/fix the types here, you can simply just add this one integration (I can then backport your PR to v10 and make a release).but I know some methods from core shouldn't be exposed to workers
We had the rule of not importing everything in v10, as we still relied on
nodejs_alsas default, and not everything is available there. This also changed with v11 and have now better support for almost all integrations.
I'm currently trying to have better support for frameworks on Cloudflare. I'll put it on my list together with this ticket #24841 to clean it up and try to make better types.
- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3
on Oct 2, 2026 - added a commit that references this issue
on Oct 5, 2026 A PR closing this issue has just been released 🚀
This issue was referenced by PR #25061, which was included in the 11.5.0 release.
Metadata
Metadata
Assignees
Projects
- StatusShow more project fieldsNo status
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
10.75.3
Framework Version
SvelteKit 2.63.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
hooks.server.ts:Steps to Reproduce
Expected Result
Works fine
Actual Result
Production down due to calling a non-existent function
Additional Context
The types provided by
@sentry/sveltekitdon't line up with what's exported when run in the workers runtime https://github.com/getsentry/sentry-javascript/blob/develop/packages/sveltekit/src/worker/index.ts. Because SvelteKit development usually happens on node, it's difficult to catch this before deploying live, unless you test against a workers runtime prior to deploy.Handling workers the way it's done for eg. remix, which has a separate
/cloudflareexport under it would likely by ideal to avoid this kind of confusion.Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it.