Debug/sentry initialization #132
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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):cloudflare.ts, including checks for DSN existence, length, and available environment keys. Logging now usesconsole.errorfor missing DSN and is always enabled. [1] [2]hono/app.tsto log Sentry status and span creation for every request, with warnings if Sentry is not configured./debug-sentryendpoint 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):