-
Notifications
You must be signed in to change notification settings - Fork 42
Reference for Issue #210 #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
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 39e0177
reorganize
a-y-a-n-das 0e6af9d
Update monitor-vercel-errors.js
a-y-a-n-das a43f8c4
Update monitor-vercel-errors.js
a-y-a-n-das 6851f10
Update monitor-vercel-errors.js
a-y-a-n-das f2588ac
Update monitor-vercel-errors.js
a-y-a-n-das 0af3f2a
Add Sentry to GitHub issue fetch workflow
a-y-a-n-das 5b4f6d2
Update fetch-issue.yml
a-y-a-n-das 88665e9
Update fetch-issue.yml
a-y-a-n-das 1da98a0
Update fetch-issue.yml
a-y-a-n-das 8b9084f
Update fetch-issue.yml
a-y-a-n-das 0483cd6
Update fetch-issue.yml
a-y-a-n-das 12904d4
Update fetch-issue.yml
a-y-a-n-das bf89864
Update fetch-issue.yml
a-y-a-n-das d00d064
Update sentry-to-github.js
a-y-a-n-das f8e4863
Update fetch-issue.yml
a-y-a-n-das e45f450
Update fetch-issue.yml
a-y-a-n-das 761f419
Update fetch-issue.yml
a-y-a-n-das f14e155
Update fetch-issue.yml
a-y-a-n-das 1f02f1c
Merge pull request #6 from a-y-a-n-das/sentry-to-github-issue
a-y-a-n-das aa8ddd2
Update fetch-issue.yml
a-y-a-n-das 8ca1e7b
Update sentry-to-github.js
a-y-a-n-das 5959077
Sentry
a-y-a-n-das 485846b
Update sentry-to-github.js
a-y-a-n-das 4c95cbd
Update sentry-to-github.js
a-y-a-n-das 9d71cb5
Update sentry-to-github.js
a-y-a-n-das 91a3bf4
Update sentry-to-github.js
a-y-a-n-das b030165
Delete scripts/error-hashes.json
a-y-a-n-das ba76e4f
Delete scripts/monitor-vercel-errors.js
a-y-a-n-das b87a0f9
Update fetch-issue.yml
a-y-a-n-das b3b2e1e
Delete .github/workflows/vercel-error-monitor.yml
a-y-a-n-das 2aa61f4
Update package.json for server
a-y-a-n-das 6037bf3
conclusion
a-y-a-n-das 59c8726
Update turbo.json for DSN env
a-y-a-n-das c56c1e5
added node fetch
a-y-a-n-das 04f5cdf
Update fetch-issue.yml
a-y-a-n-das 810a97f
forgot `,`
a-y-a-n-das 4c6eacc
generated pnpm-lock.yml
a-y-a-n-das f3363e5
fix: add node-fetch to root workspace
a-y-a-n-das File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" }); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.