Skip to content

feat(core): Introduce debug to replace logger #16906

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 2 commits into from
Jul 10, 2025
Merged

Conversation

AbhiPrasad
Copy link
Member

resolves #16903

ref #16901

This PR introduces a debug function that aims to replace logger.

This gives us a couple of benefits:

  1. communicates intent of the export much better
  2. avoids collision with logger exported from other sdks (which is used for sentry structured logging)
  3. we can move structured logging logger code into @sentry/core, reducing duplication across our sdks

We don't deprecate logger just yet, we need to convert everything else in the other SDKs first.

@AbhiPrasad AbhiPrasad requested review from mydea and a team July 10, 2025 16:48
@AbhiPrasad AbhiPrasad self-assigned this Jul 10, 2025
@AbhiPrasad AbhiPrasad requested review from msonnb and removed request for a team July 10, 2025 16:48
Copy link
Contributor

github-actions bot commented Jul 10, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 23.97 kB +0.47% +111 B 🔺
@sentry/browser - with treeshaking flags 22.43 kB -0.28% -62 B 🔽
@sentry/browser (incl. Tracing) 39.81 kB +0.27% +104 B 🔺
@sentry/browser (incl. Tracing, Replay) 77.93 kB +0.05% +34 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.74 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 82.63 kB +0.06% +49 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 94.73 kB +0.03% +20 B 🔺
@sentry/browser (incl. Feedback) 40.66 kB +0.3% +118 B 🔺
@sentry/browser (incl. sendFeedback) 28.64 kB +0.4% +113 B 🔺
@sentry/browser (incl. FeedbackAsync) 33.54 kB +0.34% +113 B 🔺
@sentry/react 25.68 kB +0.32% +80 B 🔺
@sentry/react (incl. Tracing) 41.78 kB +0.28% +116 B 🔺
@sentry/vue 28.39 kB +0.42% +116 B 🔺
@sentry/vue (incl. Tracing) 41.59 kB +0.26% +107 B 🔺
@sentry/svelte 23.98 kB +0.48% +113 B 🔺
CDN Bundle 25.24 kB - -
CDN Bundle (incl. Tracing) 39.48 kB - -
CDN Bundle (incl. Tracing, Replay) 75.45 kB -0.17% -121 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 80.9 kB -0.16% -124 B 🔽
CDN Bundle - uncompressed 73.67 kB - -
CDN Bundle (incl. Tracing) - uncompressed 117.27 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.44 kB -0.14% -320 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 244.26 kB -0.14% -320 B 🔽
@sentry/nextjs (client) 43.39 kB +0.21% +89 B 🔺
@sentry/sveltekit (client) 40.27 kB +0.28% +109 B 🔺
@sentry/node 167.63 kB +0.03% +48 B 🔺
@sentry/node - without tracing 100.36 kB +0.07% +61 B 🔺
@sentry/aws-serverless 128.49 kB +0.05% +53 B 🔺

View base workflow run

@AbhiPrasad AbhiPrasad merged commit ccbf627 into develop Jul 10, 2025
168 checks passed
@AbhiPrasad AbhiPrasad deleted the abhi-debug-logger branch July 10, 2025 17:58
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.

Create debug export in @sentry/core and switch all logger usage in @sentry/core to use debug
2 participants