Skip to content

Commit

Permalink
feat: added sentry DSN as env
Browse files Browse the repository at this point in the history
  • Loading branch information
mbret committed Sep 29, 2024
1 parent b1a06cf commit 843e851
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/_api-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
echo "CONTACT_TO_ADDRESS=${{secrets.CONTACT_TO_ADDRESS}}" >> packages/api/.env
echo "SUPABASE_SERVICE_ROLE_KEY=${{secrets.SUPABASE_SERVICE_ROLE_KEY}}" >> packages/api/.env
echo "COUCH_DB_URL=${{secrets.COUCH_DB_URL}}" >> packages/api/.env
echo "SENTRY_DSN=${{secrets.SENTRY_DSN}}" >> packages/api/.env
echo "AWS_API_URI=${{inputs.AWS_API_URI}}" >> packages/api/.env
echo "SUPABASE_PROJECT_URL=${{inputs.SUPABASE_PROJECT_URL}}" >> packages/api/.env
echo "GOOGLE_BOOK_API_URL=${{inputs.GOOGLE_BOOK_API_URL}}" >> packages/api/.env
Expand Down
6 changes: 6 additions & 0 deletions packages/api/src/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
namespace NodeJS {
interface ProcessEnv {
SENTRY_DSN?: string;
}
}
2 changes: 1 addition & 1 deletion packages/api/src/libs/middy/withMiddy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as Sentry from "@sentry/aws-serverless"
// import { nodeProfilingIntegration } from "@sentry/profiling-node"

Sentry.init({
dsn: "https://[email protected]/5554285",
dsn: process.env.SENTRY_DSN,
// integrations: [nodeProfilingIntegration()],
// Add Tracing by setting tracesSampleRate and adding integration
// Set tracesSampleRate to 1.0 to capture 100% of transactions
Expand Down

0 comments on commit 843e851

Please sign in to comment.