Skip to content

Commit

Permalink
api: Await sentry registration
Browse files Browse the repository at this point in the history
  • Loading branch information
biwano committed Nov 22, 2023
1 parent b61a075 commit 965be0d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions carbonmark-api/api/serverless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ console.warn(process.env.SENTRY_DSN);
console.warn(process.env.VERCEL_GIT_COMMIT_REF);
console.warn(packageJson.version);
// Registry sentry plugin
fastify.register(import("@immobiliarelabs/fastify-sentry"), {
dsn: process.env.SENTRY_DSN,
environment: process.env.VERCEL_GIT_COMMIT_REF,
release: packageJson.version,
});

// Register your application as a normal plugin.
fastify.register(app);
fastify
.register(import("@immobiliarelabs/fastify-sentry"), {
dsn: process.env.SENTRY_DSN,
environment: process.env.VERCEL_GIT_COMMIT_REF,
release: packageJson.version,
})
.then(() => {
// Register your application as a normal plugin.
fastify.register(app);
});

module.exports = async (req: unknown, res: unknown) => {
await fastify.ready();
Expand Down

0 comments on commit 965be0d

Please sign in to comment.