Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

Merge pull request #2100 from gitroomhq/fix/sentry-skip-mcp-get-traces

Enno Gelhaus30be46ee5c82
diff --cc libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
index 44f1d711f,67c42b907..b54c10fff
--- a/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
+++ b/libraries/nestjs-libraries/src/sentry/initialize.sentry.ts
@@@ -59,8 -59,15 +59,15 @@@ export const initializeSentry = (appNam
const path = String(
normalizedRequest?.url || attributes?.['http.target'] || attributes?.['url.path'] || name || ''
);
+ const method = String(
+ normalizedRequest?.method || attributes?.['http.request.method'] || attributes?.['http.method'] || ''
+ );
+ // MCP stream GETs are declined with 405; never trace them
+ if (method === 'GET' && /^(https?:\/\/[^/]+)?\/mcp(\/|-oauth|\?|$)/.test(path)) {
+ return 0;
+ }
return inheritOrSampleWith(
- path.includes('/public/v1/analytics/') ? 0.01 : 0.2
+ path.includes('/public/v1/analytics/') ? 0.01 : 0.1
);
},
enableLogs: true,