chore: Wire up Sentry for API (#12756)
This commit is contained in:
parent
a568e1ac66
commit
2352bb1075
|
@ -1,6 +1,8 @@
|
||||||
const { withAxiom } = require("next-axiom");
|
const { withAxiom } = require("next-axiom");
|
||||||
|
const { withSentryConfig } = require("@sentry/nextjs");
|
||||||
|
|
||||||
module.exports = withAxiom({
|
const plugins = [withAxiom];
|
||||||
|
const nextConfig = {
|
||||||
transpilePackages: [
|
transpilePackages: [
|
||||||
"@calcom/app-store",
|
"@calcom/app-store",
|
||||||
"@calcom/core",
|
"@calcom/core",
|
||||||
|
@ -66,4 +68,15 @@ module.exports = withAxiom({
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (!!process.env.NEXT_PUBLIC_SENTRY_DSN) {
|
||||||
|
nextConfig["sentry"] = {
|
||||||
|
autoInstrumentServerFunctions: true,
|
||||||
|
hideSourceMaps: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins.push(withSentryConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = () => plugins.reduce((acc, next) => next(acc), nextConfig);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
export {};
|
|
@ -0,0 +1,5 @@
|
||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||||
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
import * as Sentry from "@sentry/nextjs";
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
||||||
|
tracesSampleRate: 1.0,
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user