Skip to content

Commit

Permalink
Add sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
opti21 committed Apr 26, 2022
1 parent e13a257 commit 899a7fc
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"dependencies": {
"@growthbook/growthbook": "^0.17.0",
"@prisma/client": "^3.12.0",
"@sentry/node": "^6.19.7",
"@sentry/tracing": "^6.19.7",
"@types/express": "^4.17.13",
"axios": "^0.25.0",
"dotenv": "^15.0.0",
Expand Down
97 changes: 96 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import { parseYTDuration } from "./utils";
import express from "express";
import Pusher from "pusher";
import { GrowthBook } from "@growthbook/growthbook";
import * as Sentry from "@sentry/node";
import "@sentry/tracing";

Sentry.init({
dsn: process.env.CHAT_SENTRY_DSN,
tracesSampleRate: 1.0,
});

const FEATURES_ENDPOINT = process.env.NEXT_PUBLIC_GROWTHBOOK_ENDPOINT;
const growthbook = new GrowthBook({
Expand All @@ -21,7 +28,6 @@ const growthbook = new GrowthBook({
});

const getFeatures = async () => {
console.log("Getting features");
await axios
.get(FEATURES_ENDPOINT!)
.then((res) => {
Expand Down

0 comments on commit 899a7fc

Please sign in to comment.