Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abdc3cb6db | ||
| 7a1bd50119 |
@@ -628,6 +628,37 @@ pm2 restart all
|
||||
|
||||
### Step 13: Test Error Tracking
|
||||
|
||||
You can test Bugsink is working before configuring the flyer-crawler application.
|
||||
|
||||
Switch to the bugsink user and open a Python shell:
|
||||
|
||||
```bash
|
||||
sudo su - bugsink
|
||||
source venv/bin/activate
|
||||
bugsink-manage shell
|
||||
```
|
||||
|
||||
In the Python shell, send a test message using the **backend DSN** from Step 11:
|
||||
|
||||
```python
|
||||
import sentry_sdk
|
||||
sentry_sdk.init("https://YOUR_BACKEND_KEY@bugsink.yourdomain.com/1")
|
||||
sentry_sdk.capture_message("Test message from Bugsink setup")
|
||||
exit()
|
||||
```
|
||||
|
||||
Exit back to root:
|
||||
|
||||
```bash
|
||||
exit
|
||||
```
|
||||
|
||||
Check the Bugsink UI - you should see the test message appear in the `flyer-crawler-backend` project.
|
||||
|
||||
### Step 14: Test from Flyer-Crawler Application (After App Setup)
|
||||
|
||||
Once the flyer-crawler application is installed and configured with the DSNs from Step 12:
|
||||
|
||||
```bash
|
||||
cd /opt/flyer-crawler
|
||||
npx tsx scripts/test-bugsink.ts
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "flyer-crawler",
|
||||
"version": "0.9.95",
|
||||
"version": "0.9.96",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "flyer-crawler",
|
||||
"version": "0.9.95",
|
||||
"version": "0.9.96",
|
||||
"dependencies": {
|
||||
"@bull-board/api": "^6.14.2",
|
||||
"@bull-board/express": "^6.14.2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "flyer-crawler",
|
||||
"private": true,
|
||||
"version": "0.9.95",
|
||||
"version": "0.9.96",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "concurrently \"npm:start:dev\" \"vite\"",
|
||||
|
||||
@@ -3,6 +3,8 @@ import { mockLogger } from '../utils/mockLogger';
|
||||
|
||||
// Globally mock the logger service so individual test files don't have to.
|
||||
// This ensures 'import { logger } from ...' always returns the mock.
|
||||
// IMPORTANT: Must also export createScopedLogger as it's used by aiService.server.ts
|
||||
vi.mock('../../services/logger.server', () => ({
|
||||
logger: mockLogger,
|
||||
}));
|
||||
createScopedLogger: vi.fn(() => mockLogger),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user