{"id":15355520,"url":"https://github.com/mattipv4/workers-sentry","last_synced_at":"2025-04-15T06:37:28.773Z","repository":{"id":74238062,"uuid":"332227652","full_name":"MattIPv4/workers-sentry","owner":"MattIPv4","description":"Some wrappers for using Sentry in Workers","archived":false,"fork":false,"pushed_at":"2021-07-11T20:35:04.000Z","size":14,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T14:38:11.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MattIPv4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-23T14:19:12.000Z","updated_at":"2022-06-04T00:32:16.000Z","dependencies_parsed_at":"2023-07-11T14:35:25.082Z","dependency_job_id":null,"html_url":"https://github.com/MattIPv4/workers-sentry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fworkers-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fworkers-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fworkers-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MattIPv4%2Fworkers-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MattIPv4","download_url":"https://codeload.github.com/MattIPv4/workers-sentry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023320,"owners_count":21199953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T12:24:39.477Z","updated_at":"2025-04-15T06:37:28.755Z","avatar_url":"https://github.com/MattIPv4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# workers-sentry\n\nSome wrappers for using Sentry in Workers.\n\nAllows for source maps to be correctly uploaded to Sentry for your Workers, and for Sentry to be used in the Worker for error reporting.\n\n## Webpack config\n\n```js\nconst WorkersSentryWebpackPlugin = require('workers-sentry/webpack');\n\nmodule.exports = {\n    plugins: [\n        new WorkersSentryWebpackPlugin(\n            process.env.SENTRY_AUTH_TOKEN,\n            process.env.SENTRY_ORG,\n            process.env.SENTRY_PROJECT,\n        ),\n    ],\n};\n```\n## Worker source\n\n```js\nconst WorkersSentry = require('workers-sentry/worker');\n\nconst handleRequest = async request =\u003e {\n    // Do some stuff\n\n    // Oh no, an error!\n    throw new Error('Hello world!');\n};\n\nconst handleScheduled = async () =\u003e {\n    // Do some stuff\n\n    // Oh no, an error!\n    throw new Error('Hello world!');\n};\n\naddEventListener('fetch', event =\u003e {\n    // Start Sentry\n    const sentry = new WorkersSentry(event, process.env.SENTRY_DSN);\n\n    // Process the event\n    return event.respondWith(handleRequest(event.request)).catch(err =\u003e {\n        sentry.captureException(err);\n        throw err;\n    });\n});\n\naddEventListener('scheduled', event =\u003e {\n    // Start Sentry\n    const sentry = new WorkersSentry(event, process.env.SENTRY_DSN);\n\n    // Process the event\n    return event.waitUntil(handleScheduled()).catch(err =\u003e {\n        sentry.captureException(err);\n        throw err;\n    });\n});\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattipv4%2Fworkers-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattipv4%2Fworkers-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattipv4%2Fworkers-sentry/lists"}