{"id":17262828,"url":"https://github.com/igassmann/nextjs-sentry-too-many-deployments","last_synced_at":"2025-03-26T10:24:51.889Z","repository":{"id":85457544,"uuid":"531937124","full_name":"IGassmann/nextjs-sentry-too-many-deployments","owner":"IGassmann","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-02T13:42:42.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T13:50:43.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"nextjs-sentry-too-many-deployments.vercel.app","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/IGassmann.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":"2022-09-02T13:29:37.000Z","updated_at":"2023-03-08T12:56:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"77e4e28d-5a0a-4f1e-bad1-c54147295f2e","html_url":"https://github.com/IGassmann/nextjs-sentry-too-many-deployments","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/IGassmann%2Fnextjs-sentry-too-many-deployments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGassmann%2Fnextjs-sentry-too-many-deployments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGassmann%2Fnextjs-sentry-too-many-deployments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IGassmann%2Fnextjs-sentry-too-many-deployments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IGassmann","download_url":"https://codeload.github.com/IGassmann/nextjs-sentry-too-many-deployments/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245633847,"owners_count":20647464,"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-15T07:54:49.507Z","updated_at":"2025-03-26T10:24:51.867Z","avatar_url":"https://github.com/IGassmann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentry\n\n_Note: Currently, the minimum Next.js supported version of `@sentry/nextjs` is 10.0.8._\n\nThis is an example showing how to use [Sentry](https://sentry.io) to catch and report errors and monitor the performance of both the front and back ends, using the [official Sentry SDK for Next.js](https://docs.sentry.io/platforms/javascript/guides/nextjs/). This example contains the following:\n\n- `sentry.server.config.js` and `sentry.client.config.js` are used to configure and initialize Sentry\n- `next.config.js` automatically injects Sentry into your app using `withSentryConfig`\n- `_error.js` (which is rendered by Next.js when handling certain types of exceptions) is overridden so those exceptions can be passed along to Sentry\n- Each API route is handled with `withSentry`\n\n## Preview\n\nPreview the example live on [StackBlitz](http://stackblitz.com/):\n\n[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/vercel/next.js/tree/canary/examples/with-sentry)\n\n## Deploy your own\n\nIt only takes a few steps to create and deploy your own version of this example app. Before you begin, make sure you have [linked your Vercel account to GitHub](https://vercel.com/docs/personal-accounts/login-connections), and [set up a project in Sentry](https://docs.sentry.io/product/sentry-basics/guides/integrate-frontend/create-new-project/).\n\n### Option 1: Deploy directly to Vercel\n\nYou can deploy a copy of this project directly to [Vercel](https://vercel.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=next-example).\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-sentry\u0026project-name=nextjs-sentry-example\u0026repository-name=nextjs-sentry-example\u0026integration-ids=oac_5lUsiANun1DEzgLg0NZx5Es3)\n\nThis will clone this example to your GitHub org, create a linked project in Vercel, and prompt you to install the Vercel Sentry Integration. (You can read more about the integration [on Vercel](https://vercel.com/integrations/sentry) and in [the Sentry docs](https://docs.sentry.io/product/integrations/deployment/vercel/).)\n\n### Option 2: Create locally before deploying\n\nAlternatively, you can create a copy of this example app locally so you can configure and customize it before you deploy it.\n\n#### Create and configure your app\n\nTo begin, execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npx](https://www.npmjs.com/package/npx) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), to create the app and install dependencies:\n\n```bash\nnpx create-next-app --example with-sentry nextjs-sentry-example\n# or\nyarn create next-app --example with-sentry nextjs-sentry-example\n# or\npnpm create next-app --example with-sentry nextjs-sentry-example\n```\n\nNext, run [`sentry-wizard`](https://docs.sentry.io/platforms/javascript/guides/nextjs/#configure), which will create and populate the settings files needed by `@sentry/nextjs` to initialize the SDK and upload source maps to Sentry:\n\n```bash\nnpx @sentry/wizard -i nextjs\n```\n\n_Beware that above command creates files extended with `.wizardcopy.js` as the example already contains the config files. Thus after running the wizard, replace example files with those newly created._\n\nOnce the files are created, you can further configure your app by adding [SDK settings](https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/) to `sentry.server.config.js` and `sentry.client.config.js`, and [`SentryWebpackPlugin` settings](https://github.com/getsentry/sentry-webpack-plugin#options) to `next.config.js`.\n\n(If you'd rather do the SDK set-up manually, [you can do that, too](https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/).)\n\nYou should now be able to build and run your app locally, upload source maps, and send errors and performance data to Sentry. For more details, check out the [Sentry Next.js SDK docs](https://docs.sentry.io/platforms/javascript/guides/nextjs/).\n\n#### Deploy your app to Vercel\n\nVercel reads you code from GitHub, so you first need to [create an empty GitHub repo](https://docs.github.com/en/get-started/quickstart/create-a-repo) for your project and then add it to your local repo [as a remote](https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories):\n\n```bash\ngit remote add origin https://github.com/\u003corg\u003e/\u003crepo\u003e.git\n```\n\nNext, [create a project in Vercel](https://vercel.com/docs/projects/overview#creating-a-project) and [link it to your GitHub repo](https://vercel.com/docs/git#deploying-a-git-repository).\n\nIn order for Vercel to upload source maps to Sentry when building your app, it needs a Sentry auth token. The wizard automatically sets up your personal token locally; to use that token on Vercel, add an [environment variable](https://vercel.com/docs/projects/environment-variables) to your Vercel project with the key `SENTRY_AUTH_TOKEN` and the value you'll find in `.sentryclirc` at the root level of your project. To use an org-wide token instead, set up the Vercel Sentry Integration. (You can read more about the integration [on Vercel](https://vercel.com/integrations/sentry) and in [the Sentry docs](https://docs.sentry.io/product/integrations/deployment/vercel/).)\n\nFinally, commit your app and push it to GitHub:\n\n```bash\ngit add .\ngit commit -m \"Initial commit\"\ngit push\n```\n\nThis will trigger a deployment in Vercel. Head over to your [Vercel dashboard](https://vercel.com/dashboard), click on your project, and then click \"Visit\" to see the results!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figassmann%2Fnextjs-sentry-too-many-deployments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figassmann%2Fnextjs-sentry-too-many-deployments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figassmann%2Fnextjs-sentry-too-many-deployments/lists"}