Skip to content

Commit 3174b55

Browse files
chore: Attempt reduction of Sentry size by treeshaking tracing (#15527)
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
1 parent 08f4a48 commit 3174b55

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

apps/api/v1/instrumentation.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ export function register() {
44
if (process.env.NEXT_RUNTIME === "nodejs") {
55
Sentry.init({
66
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
7-
// reduce sample rate to 10% on production
8-
tracesSampleRate: process.env.NODE_ENV !== "production" ? 1.0 : 0.1,
97
});
108
}
119

apps/web/instrumentation.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ export function register() {
44
if (process.env.NEXT_RUNTIME === "nodejs") {
55
Sentry.init({
66
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
7-
// reduce sample rate to 10% on production
8-
tracesSampleRate: process.env.NODE_ENV !== "production" ? 1.0 : 0.1,
97
});
108
}
119

apps/web/next.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ const nextConfig = {
221221
);
222222
}
223223

224+
config.plugins.push(
225+
new webpack.DefinePlugin({
226+
__SENTRY_DEBUG__: false,
227+
__SENTRY_TRACING__: false,
228+
})
229+
);
230+
224231
config.plugins.push(
225232
new CopyWebpackPlugin({
226233
patterns: [

0 commit comments

Comments
 (0)