a cache for slack profile pictures and emojis

feat: add sentry

+1
README.md
···
```bash
SLACK_TOKEN=xoxb-123456789012-123456789012-123456789012-123456789012
SLACK_SIGNING_SECRET=12345678901234567890123456789012
+
SENTRY_DSN="https://xxxxx@xxxx.ingest.us.sentry.io/123456" # Optional
DATABASE_PATH=/path/to/db.sqlite # Optional
PORT=3000 # Optional
```
bun.lockb

This is a binary file and will not be displayed.

+1
package.json
···
"dependencies": {
"@elysiajs/cors": "^1.1.1",
"@elysiajs/swagger": "^1.1.6",
+
"@sentry/bun": "^8.45.0",
"@tqman/nice-logger": "^1.0.7",
"@types/node-cron": "^3.0.11",
"elysia": "latest",
+11
src/index.ts
···
import { SlackWrapper } from "./slackWrapper";
import type { SlackUser } from "./slack";
import { getEmojiUrl } from "../utils/emojiHelper";
+
import * as Sentry from "@sentry/bun";
+
+
if (process.env.SENTRY_DSN) {
+
console.log("Sentry DSN provided, error monitoring is enabled");
+
Sentry.init({
+
dsn: process.env.SENTRY_DSN, // Replace with your Sentry DSN
+
tracesSampleRate: 1.0, // Adjust this value for performance monitoring
+
});
+
} else {
+
console.warn("Sentry DSN not provided, error monitoring is disabled");
+
}
const slackApp = new SlackWrapper();