{"id":18930081,"url":"https://github.com/labd/next-sentry-tunnel","last_synced_at":"2025-04-15T15:31:16.316Z","repository":{"id":235753902,"uuid":"791170763","full_name":"labd/next-sentry-tunnel","owner":"labd","description":"Sentry tunnel using Next.js route handler","archived":true,"fork":false,"pushed_at":"2024-04-24T08:44:44.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-20T22:43:02.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/labd.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":"2024-04-24T08:14:48.000Z","updated_at":"2024-10-14T08:26:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"aeb41926-faf9-4b2d-a8ca-ae026386dbae","html_url":"https://github.com/labd/next-sentry-tunnel","commit_stats":null,"previous_names":["labd/next-sentry-tunnel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fnext-sentry-tunnel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fnext-sentry-tunnel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fnext-sentry-tunnel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labd%2Fnext-sentry-tunnel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labd","download_url":"https://codeload.github.com/labd/next-sentry-tunnel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249097902,"owners_count":21212372,"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-11-08T11:36:29.678Z","updated_at":"2025-04-15T15:31:16.302Z","avatar_url":"https://github.com/labd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-sentry-tunnel\n\nSimple solution to use Next.js route handlers for a Sentry tunnel to work around ad blockers.\nBased on [Sentry example](https://docs.sentry.io/platforms/javascript/troubleshooting/#using-the-tunnel-option)\n\nThis works just using environment variables, no further setup for now.\n\n## Install\n\nInstall using your package manager of choice (example has npm):\n\n```bash\nnpm install next-sentry-tunnel\n```\n\n## Usage\n\nFirst set up the required environment variables:\n\n```bash\nSENTRY_HOST=oXXXXXX.ingest.sentry.io\nSENTRY_PROJECTS=\"123456\" # Also allows multiple id's comma separated\n```\n\nThen set up the handlers in `app/api/tunnel/route.{ts,js}` or your own route of choice:\n\n```typescript\n// Route handler file\nexport { POST } from \"next-sentry-tunnel\";\n```\n\nAfterwards set up your `sentry.client.config.{ts,js}` to point to the tunnel:\n```typescript\n// sentry.client.config.ts\nimport * as Sentry from \"@sentry/nextjs\";\n\nSentry.init({\n    ...\n    tunnel: \"/api/tunnel\" // Or your own route of choice\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fnext-sentry-tunnel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabd%2Fnext-sentry-tunnel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabd%2Fnext-sentry-tunnel/lists"}