Title: bug: Console logs swallowed by Sentry in dev mode · Issue #2900 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: bug: Console logs swallowed by Sentry in dev mode · Issue #2900 · triggerdotdev/trigger.dev
X Title: bug: Console logs swallowed by Sentry in dev mode · Issue #2900 · triggerdotdev/trigger.dev
Description: Provide environment information Any trigger and sentry version Describe the bug Console logs (console.log, console.info, etc.) and Trigger.dev logger calls (logger.info) intermittently fail to appear in the Trigger.dev dashboard UI when ...
Open Graph Description: Provide environment information Any trigger and sentry version Describe the bug Console logs (console.log, console.info, etc.) and Trigger.dev logger calls (logger.info) intermittently fail to appe...
X Description: Provide environment information Any trigger and sentry version Describe the bug Console logs (console.log, console.info, etc.) and Trigger.dev logger calls (logger.info) intermittently fail to appe...
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/2900
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug: Console logs swallowed by Sentry in dev mode","articleBody":"### Provide environment information\n\nAny trigger and sentry version\n\n### Describe the bug\n\nConsole logs (console.log, console.info, etc.) and Trigger.dev logger calls (logger.info) intermittently fail to appear in the Trigger.dev dashboard UI when running in development mode with Sentry initialized in `trigger/init.ts`. \n\nThe issue occurs intermittently in development. When it happens, all console output is swallowed and never reaches the Trigger.dev UI, even though the task executes successfully.\n\nExpected behavior: Console logs should always appear in the Trigger.dev dashboard regardless of Sentry initialization.\n\nThe issue does NOT occur in production environments. Logs work correctly when deployed.\n\n### Reproduction repo\n\nn/a\n\n### To reproduce\n\n1. Install @sentry/node in a Trigger.dev project\n2. Create `trigger/init.ts` with:\n\n```\nimport { tasks } from \"@trigger.dev/sdk\";\nimport * as Sentry from \"@sentry/node\";\n\nSentry.init({\n defaultIntegrations: false,\n dsn: process.env.SENTRY_DSN,\n environment: process.env.NODE_ENV === \"production\" ? \"production\" : \"development\",\n});\n\ntasks.onFailure(({ payload, error, ctx }) => {\n Sentry.captureException(error, {\n extra: { payload, ctx },\n });\n await Sentry.flush(2000);\n});\n```\n3. Create a test task that logs extensively:\n\n```\nexport const testTask = task({\n id: \"test\",\n run: async () => {\n console.log(\"Test log\");\n console.info(\"Test info\");\n logger.info(\"Trigger logger test\");\n return { success: true };\n },\n});\n```\n4. Run [trigger dev](https://trigger.dev/docs/manual-setup#option-1:-using-npx/pnpm-dlx/yarn-dlx)\n5. Observe that logs intermittently do not appear in the Trigger.dev dashboard UI\n\n\n\n### Additional information\n\n- Issue only affects development mode, not production\n- Issue most likely happens because in development environment, `init.ts` loads dynamically when tasks run, but this happens after ConsoleInterceptor is created during bootstrap and before ConsoleInterceptor.intercept() is called","author":{"url":"https://github.com/isshaddad","@type":"Person","name":"isshaddad"},"datePublished":"2026-01-16T14:20:33Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/2900"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ad13374e-259e-017d-6b2d-f8a23f0a8cc2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B7EA:8BE43:2F63AB5:4345626:6AFAE22D |
| html-safe-nonce | c06c6ccc685de2e8ef86177c94dcb220c6d6ed4de5ce8746f85ca83dcad6ec45 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0VBOjhCRTQzOjJGNjNBQjU6NDM0NTYyNjo2QUZBRTIyRCIsInZpc2l0b3JfaWQiOiIzNTI3NjE4OTAxNTY5MTAyMzgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5629b38eaa97f2f346d2de4e6300ed0f7aaeac527aa77be228010b069828670d |
| hovercard-subject-tag | issue:3822243607 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/2900/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4e9faaf3afd0a86a54d9264e27785a2d9b45378f784045da36f3bdd21d16869b/triggerdotdev/trigger.dev/issues/2900 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4e9faaf3afd0a86a54d9264e27785a2d9b45378f784045da36f3bdd21d16869b/triggerdotdev/trigger.dev/issues/2900 |
| og:image:alt | Provide environment information Any trigger and sentry version Describe the bug Console logs (console.log, console.info, etc.) and Trigger.dev logger calls (logger.info) intermittently fail to appe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | isshaddad |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d9bd51a568909a83d1abb9d6f74d68f0c87ca85fe3a56d3f5d70d8b89add9f2 |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a7ae932999cc6d511008dbf980ff9efad2a31f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width