From 4caba6b18692925f809eb32fb1af3e3ddc05c460 Mon Sep 17 00:00:00 2001 From: Ahmad <103906421+ahmadk953@users.noreply.github.com> Date: Sun, 19 Jan 2025 16:49:02 -0500 Subject: [PATCH] Added Sentry Redis Integration --- sentry.client.config.ts | 4 ++-- sentry.edge.config.ts | 4 ++-- sentry.server.config.ts | 10 ++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sentry.client.config.ts b/sentry.client.config.ts index 7527e82..292013b 100644 --- a/sentry.client.config.ts +++ b/sentry.client.config.ts @@ -24,7 +24,7 @@ Sentry.init({ // Set tracesSampleRate to 1.0 to capture 100% // of transactions for tracing. // We recommend adjusting this value in production - tracesSampleRate: 1.0, + tracesSampleRate: 0.5, // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ['localhost', /^https:\/\/tasko\.ahmadk953\.org/], @@ -33,7 +33,7 @@ Sentry.init({ // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + profilesSampleRate: 0.5, // Define how likely Replay events are sampled. replaysSessionSampleRate: 0.25, diff --git a/sentry.edge.config.ts b/sentry.edge.config.ts index 7f99200..5d981ea 100644 --- a/sentry.edge.config.ts +++ b/sentry.edge.config.ts @@ -11,7 +11,7 @@ Sentry.init({ // Set tracesSampleRate to 1.0 to capture 100% // of transactions for tracing. // We recommend adjusting this value in production - tracesSampleRate: 1.0, + tracesSampleRate: 0.5, // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ['localhost', /^https:\/\/tasko\.ahmadk953\.org/], @@ -20,7 +20,7 @@ Sentry.init({ // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + profilesSampleRate: 0.5, // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false, diff --git a/sentry.server.config.ts b/sentry.server.config.ts index 3695e3e..f5f46cc 100644 --- a/sentry.server.config.ts +++ b/sentry.server.config.ts @@ -7,10 +7,16 @@ import * as Sentry from '@sentry/nextjs'; Sentry.init({ dsn: 'https://bb697105eaabbc6f70af12e84e936ded@o4508368569368576.ingest.us.sentry.io/4508368582017024', + integrations: [ + Sentry.redisIntegration({ + cachePrefixes: ['tasko:'], + }), + ], + // Set tracesSampleRate to 1.0 to capture 100% // of transactions for tracing. // We recommend adjusting this value in production - tracesSampleRate: 1.0, + tracesSampleRate: 0.5, // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled tracePropagationTargets: ['localhost', /^https:\/\/tasko\.ahmadk953\.org/], @@ -19,7 +25,7 @@ Sentry.init({ // the final profiling rate can be computed as tracesSampleRate * profilesSampleRate // For example, a tracesSampleRate of 0.5 and profilesSampleRate of 0.5 would // result in 25% of transactions being profiled (0.5*0.5=0.25) - profilesSampleRate: 1.0, + profilesSampleRate: 0.5, // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: false,