Skip to content

Conversation

@KyleTryon
Copy link
Contributor

This pull request adds comprehensive Sentry debug logging and diagnostics across both backend (cloudflare.ts, hono/app.ts) and frontend (main.tsx) code, making it easier to verify Sentry configuration, initialization, and runtime status in all environments. Logging is now always enabled (not just in development), and diagnostic endpoints and test messages are included to confirm Sentry is working as expected.

Sentry Debug Logging and Diagnostics

Backend (cloudflare.ts, hono/app.ts):

  • Added detailed debug logs to Sentry initialization and configuration in cloudflare.ts, including checks for DSN existence, length, and available environment keys. Logging now uses console.error for missing DSN and is always enabled. [1] [2]
  • Enhanced HTTP middleware in hono/app.ts to log Sentry status and span creation for every request, with warnings if Sentry is not configured.
  • Improved /debug-sentry endpoint to provide comprehensive diagnostics, including runtime info, DSN details, available Sentry methods, environment keys, and attempts to send test errors and logs to Sentry, with robust error handling.

Frontend (main.tsx):

  • Added always-on debug logs for Sentry DSN status, type, length, and all VITE env keys before initialization. Sentry configuration is logged in detail regardless of environment.
  • Sentry initialization and test message sending are now logged in all environments, not just development. Errors in initialization or test message sending are logged as well.

@KyleTryon
Copy link
Contributor Author

@sentry review

@KyleTryon KyleTryon force-pushed the debug/sentry-initialization branch from 95cf692 to 4c36bc8 Compare January 22, 2026 18:32
@KyleTryon KyleTryon merged commit dca6be3 into main Jan 22, 2026
14 checks passed
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