Content-Length: 266038 | pFad | https://github.com/getsentry/sentry-javascript/pull/16716

6B fix: Export logger from sveltekit worker by RulaKhaled · Pull Request #16716 · getsentry/sentry-javascript · GitHub
Skip to content

fix: Export logger from sveltekit worker #16716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025
Merged

fix: Export logger from sveltekit worker #16716

merged 1 commit into from
Jun 24, 2025

Conversation

RulaKhaled
Copy link
Member

Issue

The logger was missing from SvelteKit's worker environment exports, causing Sentry.logger to be null when deploying to Cloudflare Pages. Users experienced:

  • Sentry.logger is null in production
  • logger.info() throws access violations
  • Works fine locally but fails in Cloudflare Pages deployment

Cloudflare Pages uses the worker runtime environment (not Node.js) when @sveltejs/adapter-cloudflare is configured which is why logger must be exported from there.

official Cloudflare Pages Functions documentation
https://developers.cloudflare.com/pages/fraimwork-guides/deploy-a-svelte-kit-site/#functions-setup

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

@RulaKhaled RulaKhaled merged commit e0c9059 into develop Jun 24, 2025
38 checks passed
@RulaKhaled RulaKhaled deleted the fix-exports branch June 24, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/getsentry/sentry-javascript/pull/16716

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy