Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b7aab02
added automation script
a-y-a-n-das Oct 4, 2025
39e0177
reorganize
a-y-a-n-das Oct 4, 2025
0e6af9d
Update monitor-vercel-errors.js
a-y-a-n-das Oct 4, 2025
a43f8c4
Update monitor-vercel-errors.js
a-y-a-n-das Oct 4, 2025
6851f10
Update monitor-vercel-errors.js
a-y-a-n-das Oct 4, 2025
f2588ac
Update monitor-vercel-errors.js
a-y-a-n-das Oct 4, 2025
0af3f2a
Add Sentry to GitHub issue fetch workflow
a-y-a-n-das Oct 5, 2025
5b4f6d2
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
88665e9
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
1da98a0
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
8b9084f
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
0483cd6
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
12904d4
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
bf89864
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
d00d064
Update sentry-to-github.js
a-y-a-n-das Oct 5, 2025
f8e4863
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
e45f450
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
761f419
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
f14e155
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
1f02f1c
Merge pull request #6 from a-y-a-n-das/sentry-to-github-issue
a-y-a-n-das Oct 5, 2025
aa8ddd2
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
8ca1e7b
Update sentry-to-github.js
a-y-a-n-das Oct 5, 2025
5959077
Sentry
a-y-a-n-das Oct 5, 2025
485846b
Update sentry-to-github.js
a-y-a-n-das Oct 5, 2025
4c95cbd
Update sentry-to-github.js
a-y-a-n-das Oct 5, 2025
9d71cb5
Update sentry-to-github.js
a-y-a-n-das Oct 5, 2025
91a3bf4
Update sentry-to-github.js
a-y-a-n-das Oct 5, 2025
b030165
Delete scripts/error-hashes.json
a-y-a-n-das Oct 5, 2025
ba76e4f
Delete scripts/monitor-vercel-errors.js
a-y-a-n-das Oct 5, 2025
b87a0f9
Update fetch-issue.yml
a-y-a-n-das Oct 5, 2025
b3b2e1e
Delete .github/workflows/vercel-error-monitor.yml
a-y-a-n-das Oct 5, 2025
2aa61f4
Update package.json for server
a-y-a-n-das Oct 5, 2025
6037bf3
conclusion
a-y-a-n-das Oct 5, 2025
59c8726
Update turbo.json for DSN env
a-y-a-n-das Oct 5, 2025
c56c1e5
added node fetch
a-y-a-n-das Oct 6, 2025
04f5cdf
Update fetch-issue.yml
a-y-a-n-das Oct 6, 2025
810a97f
forgot `,`
a-y-a-n-das Oct 6, 2025
4c6eacc
generated pnpm-lock.yml
a-y-a-n-das Oct 6, 2025
f3363e5
fix: add node-fetch to root workspace
a-y-a-n-das Oct 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/fetch-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: fetch-issue-sentry


on:
push:
branches:
- sentry-to-github-issue
schedule:
- cron: "0 * * * *" # Runs every hour
workflow_dispatch:

jobs:
fetch-issues:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Sentry to GitHub script
run: |
node scripts/sentry-to-github.js
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MY_GITHUB_REPO: ${{ secrets.MY_GITHUB_REPO }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}













16 changes: 16 additions & 0 deletions apps/homepage2/pages/api/test-error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

import Sentry from '../../sentry';

console.log("SENTRY_DSN =", process.env.SENTRY_DSN);

export default async function handler(req, res) {
try {
throw new Error("🚨 Test Sentry error");
} catch (err) {
console.log("Sending error to Sentry:", err.message);
Sentry.captureException(err);

await Sentry.flush(2000); // wait max 2s
res.status(500).json({ message: "Error sent to Sentry" });
}
}
10 changes: 10 additions & 0 deletions apps/homepage2/sentry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Sentry from "@sentry/node";

Sentry.init({
dsn: process.env.SENTRY_DSN,
tracesSampleRate: 1.0,
sendDefaultPii: true,
environment: process.env.NODE_ENV || "development",
});

export default Sentry;
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"ui:add": "pnpm --filter @repo/ui ui:add"
},
"devDependencies": {
"eslint": "^8",
"@repo/eslint-config-custom": "workspace:*",
"eslint": "^8",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^2.8.0",
Expand All @@ -22,11 +22,14 @@
"name": "jsonresume.org",
"dependencies": {
"@changesets/cli": "^2.27.1",
"dotenv": "^16.0.3"
"@sentry/node": "^10.17.0",
"dotenv": "^16.0.3",
"node-fetch": "3"
},
"pnpm": {
"overrides": {
"handlebars@<4.7.8": "^4.7.8",
"node-fetch": "^3.3.2",
"uglify-js@<3.0.0": "^3.19.3",
"tar@<6.2.1": "^6.2.1",
"marked@<4.0.10": "^4.0.10",
Expand Down
Loading