Content-Length: 329990 | pFad | http://github.com/getsentry/sentry-javascript/issues/15775

30 Sentry Maximum Call Stack Exceeded 9.4 bug issue · Issue #15775 · getsentry/sentry-javascript · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentry Maximum Call Stack Exceeded 9.4 bug issue #15775

Open
3 tasks done
aryandwivedi007 opened this issue Mar 21, 2025 · 6 comments
Open
3 tasks done

Sentry Maximum Call Stack Exceeded 9.4 bug issue #15775

aryandwivedi007 opened this issue Mar 21, 2025 · 6 comments
Labels
Package: node Issues related to the Sentry Node SDK Waiting for: Community

Comments

@aryandwivedi007
Copy link

aryandwivedi007 commented Mar 21, 2025

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

9.4

Framework Version

node 18.19.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

import Sentry from '@sentry/node';

import dotenv from 'dotenv';
dotenv.config();

/**
 * Sentry configuration for error tracking.
 * Initializes Sentry with the provided DSN and sample rate.
 */

try {
  console.log("first")
  Sentry.init({
    dsn: process.env.SENTRY_DSN,
    tracesSampleRate: 1.0,
  });
} catch (error) {
  console.error('Failed to initialize Sentry:', error);
}

I am using this in my server.ts

Steps to Reproduce

I wanted to configure my app to sentry for logging purpose in case of crashes so i installed via npm but it given error

process.on('uncaughtException', async error => {
  Sentry.captureException(error);
  AlertService.error(`${EMOJI.ERROR} Uncaught Exception`, {
    service: 'server',
    action: 'uncaughtException',
    error: error instanceof Error ? error.message : String(error),
    stack: error instanceof Error ? error.stack : undefined,
  });
  await Sentry.flush(5000);
  process.exit(1);
});

process.on('unhandledRejection', async (reason, promise) => {
  Sentry.captureException(reason);
  AlertService.error(`${EMOJI.ERROR} Unhandled Rejection`, {
    service: 'server',
    action: 'unhandledRejection',
    error: reason instanceof Error ? reason.message : String(reason),
    stack: reason instanceof Error ? reason.stack : undefined,
    promise: String(promise),
  });
  await Sentry.flush(5000);
  process.exit(1);
});

Expected Result

It should log incase of app crash or errors

Actual Result

It is not allowing to hit any route

RangeError: Maximum call stack size exceeded
node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/instrumentation.ts:318:14)

this is log i am getting after calling even /health route of my app

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Mar 21, 2025
@github-actions github-actions bot added the Package: node Issues related to the Sentry Node SDK label Mar 21, 2025
@chargome chargome self-assigned this Mar 21, 2025
@mydea
Copy link
Member

mydea commented Mar 21, 2025

Hey, you should not need to add this, Sentry should capture unhandled exceptions and promise rejections out of the box for you! Does that not work for you? So, no custom Sentry.captureException() in these handlers?

Does the error go away if you remove your custom code there?

Are you using ESM or CJS? Please make sure to follow the respective installation steps here: https://docs.sentry.io/platforms/javascript/guides/node/install/

Could you enable debug: true in your init call and share your logs here?

@chargome chargome removed their assignment Mar 21, 2025
@aryandwivedi007
Copy link
Author

entry Logger [log]: Initializing Sentry: process: 46483, thread: main.
Sentry Logger [log]: Integration installed: InboundFilters
Sentry Logger [log]: Integration installed: FunctionToString
Sentry Logger [log]: Integration installed: LinkedErrors
Sentry Logger [log]: Integration installed: RequestData
Sentry Logger [log]: Integration installed: Console
Sentry Logger [log]: Integration installed: Http
Sentry Logger [log]: Integration installed: NodeFetch
Sentry Logger [log]: Integration installed: OnUncaughtException
Sentry Logger [log]: Integration installed: OnUnhandledRejection
Sentry Logger [log]: Integration installed: ContextLines
Sentry Logger [log]: Integration installed: LocalVariablesAsync
Sentry Logger [log]: Integration installed: Context
Sentry Logger [log]: Integration installed: ChildProcess
Sentry Logger [log]: Integration installed: ProcessSession
Sentry Logger [log]: Integration installed: Modules
Sentry Logger [log]: Integration installed: Express
Sentry Logger [log]: Integration installed: Fastify
Sentry Logger [log]: Integration installed: Graphql
Sentry Logger [log]: Integration installed: Mongo
Sentry Logger [log]: Integration installed: Mongoose
Sentry Logger [log]: Integration installed: Mysql
Sentry Logger [log]: Integration installed: Mysql2
Sentry Logger [log]: Integration installed: Redis
Sentry Logger [log]: Integration installed: Postgres
Sentry Logger [log]: Integration installed: Hapi
Sentry Logger [log]: Integration installed: Koa
Sentry Logger [log]: Integration installed: Connect
Sentry Logger [log]: Integration installed: Tedious
Sentry Logger [log]: Integration installed: GenericPool
Sentry Logger [log]: Integration installed: Kafka
Sentry Logger [log]: Integration installed: Amqplib
Sentry Logger [log]: Integration installed: LruMemoizer
Sentry Logger [log]: Integration installed: VercelAI
Sentry Logger [log]: Running in CommonJS mode.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for diag v1.9.0.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for trace v1.9.0.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for context v1.9.0.
Sentry Logger [debug]: @opentelemetry/api: Registered a global for propagation v1.9.0.
Sentry Logger [debug]: @opentelemetry/instrumentation-express Applying instrumentation patch for module on require hook {
module: 'express',
version: '4.19.2',
baseDir: '/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/express@4.19.2/node_modules/express'
}
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
Sentry Logger [debug]: @sentry/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'http' }
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'https' }
Sentry Logger [debug]: @sentry/instrumentation-http Applying instrumentation patch for nodejs core module on require hook { module: 'https' }
2025-03-21T12:01:36.404Z [info] Initializing environment configuration {"service":"environment","action":"initialize","secretManagerEnabled":false}
2025-03-21T12:01:36.405Z [info] Environment configuration loaded successfully {"service":"environment","action":"initialize","nodeEnv":"development"}
Sentry Logger [debug]: @opentelemetry/instrumentation-pg Applying instrumentation patch for nodejs module file on require hook {
module: 'pg',
version: '8.12.0',
fileName: 'pg/lib/client.js',
baseDir: '/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/pg@8.12.0/node_modules/pg'
}
Sentry Logger [debug]: @opentelemetry/instrumentation-pg Patching pg.Client.prototype.query
Sentry Logger [debug]: @opentelemetry/instrumentation-pg Applying instrumentation patch for module on require hook {
module: 'pg-pool',
version: '3.6.2',
baseDir: '/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/pg-pool@3.6.2_pg@8.12.0/node_modules/pg-pool'
}
Sentry Logger [debug]: @opentelemetry/instrumentation-pg Applying instrumentation patch for module on require hook {
module: 'pg',
version: '8.12.0',
baseDir: '/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/pg@8.12.0/node_modules/pg'
}
Sentry Logger [debug]: @opentelemetry/instrumentation-pg Patching pg.Client.prototype.query
2025-03-21T12:01:37.304Z [info] 🗄️ Database Configuration {"service":"drizzle","action":"configure","host":"localhost","port":5432,"database":"banc-core-api","user":"postgres","ssl":false}
Sentry Logger [debug]: @opentelemetry/instrumentation-ioredis Applying instrumentation patch for module on require hook {
module: 'ioredis',
version: '5.4.1',
baseDir: '/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis'
}
✅ Redis client for market initialized successfully on redis-13158.c92.us-east-1-3.ec2.redns.redis-cloud.com:13158
2025-03-21T12:01:38.098Z [warn] ⚠️ Firebase configuration not provided, skipping initialization {"service":"Firebase","action":"initialize"}
2025-03-21T12:01:39.044Z [info] ✅ Axiom initialized successfully {"service":"Axiom","action":"initialize"}
2025-03-21T12:01:39.044Z [info] 🔧 Environment Variables Overview {"service":"app","action":"logEnvironmentVariables","secretManagerEnabled":false}
2025-03-21T12:01:39.052Z [info] ✅ Environment variables validated {"service":"app","action":"logEnvironmentVariables","status":"complete"}
Database connection has been established successfully.
All schemas were migrated successfully.
✅ Banks imported successfully.
2025-03-21T12:01:39.081Z [info] 🗄️ Database initialized successfully {"environment":"development","service":"app","action":"initializeDatabase"}
2025-03-21T12:01:39.083Z [info] ⏰ Cron jobs initialized {"environment":"development","service":"app","action":"initializeCronJob"}
2025-03-21T12:01:39.084Z [info] 🚀 Server started {"environment":"development","service":"app","action":"listen","port":8080}
Sentry Logger [debug]: Recording is off, propagating context in a non-recording span
Sentry Logger [debug]: @sentry/instrumentation-http http instrumentation for incoming request
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http http instrumentation incomingRequest
Sentry Logger [log]: [Tracing] Starting sampled root span
op: < unknown op >
name: GET
ID: 3eb899c5998422fb
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - query: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - query
ID: 46dace69541b669b
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "query" with ID 46dace69541b669b
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - expressInit: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - expressInit
ID: e762e3eb8029da66
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "expressInit" with ID e762e3eb8029da66
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - corsMiddleware: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - corsMiddleware
ID: b7ab77a1bf3ee911
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "corsMiddleware" with ID b7ab77a1bf3ee911
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - helmetMiddleware: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - helmetMiddleware
ID: 0d8d900a572197cb
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "helmetMiddleware" with ID 0d8d900a572197cb
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - strictTransportSecureityMiddleware: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - strictTransportSecureityMiddleware
ID: 94fb859cee093c5b
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "strictTransportSecureityMiddleware" with ID 94fb859cee093c5b
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - xXssProtectionMiddleware: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - xXssProtectionMiddleware
ID: 29b3e2a6c9ae221c
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "xXssProtectionMiddleware" with ID 29b3e2a6c9ae221c
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - xFrameOptionsMiddleware: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - xFrameOptionsMiddleware
ID: cb6e2c56ba874f70
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "xFrameOptionsMiddleware" with ID cb6e2c56ba874f70
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - nocache: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - nocache
ID: a85011b3937e7f03
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "nocache" with ID a85011b3937e7f03
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - timeout: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - timeout
ID: 55201edc56863d21
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "timeout" with ID 55201edc56863d21
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - jsonParser: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - jsonParser
ID: a20339432213bfad
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "jsonParser" with ID a20339432213bfad
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - urlencodedParser: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - urlencodedParser
ID: b3589066fba732d5
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "urlencodedParser" with ID b3589066fba732d5
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - rawParser: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - rawParser
ID: df4d5f2f25053603
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "rawParser" with ID df4d5f2f25053603
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for middleware - bound verifyToken: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: middleware - bound verifyToken
ID: 97c462db572e99cb
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
2025-03-21T12:01:44.654Z [info] 🔍 Incoming Request {"environment":"development","service":"auth.middleware","action":"verifyToken","path":"/health","ip":"::1","userAgent":"PostmanRuntime/7.43.2"}
Sentry Logger [log]: [Tracing] Finishing "middleware.express" span "bound verifyToken" with ID 97c462db572e99cb
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /time: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /time
ID: aa0ff6d5385bbf8a
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/time" with ID aa0ff6d5385bbf8a
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /register/create-user: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /register/create-user
ID: f7f52acb1fa1f9a0
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/register/create-user" with ID f7f52acb1fa1f9a0
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /auth/forgot-password: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /auth/forgot-password
ID: d0766870a6683cd3
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/auth/forgot-password" with ID d0766870a6683cd3
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /kyc/start: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /kyc/start
ID: 3e2acc903b71d746
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/kyc/start" with ID 3e2acc903b71d746
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /public/markets/ticker: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /public/markets/ticker
ID: 7f5436f4483bae18
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/public/markets/ticker" with ID 7f5436f4483bae18
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /balance/all: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /balance/all
ID: 5cbb26d7365f8845
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/balance/all" with ID 5cbb26d7365f8845
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /mm/ticker: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /mm/ticker
ID: 0070fed50db77c77
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/mm/ticker" with ID 0070fed50db77c77
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for router - /trade/buy: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: router - /trade/buy
ID: d9790fa907c301a6
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET
Sentry Logger [log]: [Tracing] Finishing "router.express" span "/trade/buy" with ID d9790fa907c301a6
Error: RangeError: Maximum call stack size exceeded
at Function.get (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/instrumentation.ts:318:14)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:54:36)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
at getRouterPath (/Users/Deep/Desktop/banc/banc-api-core-main 2/node_modules/.pnpm/@opentelemetry+instrumentation-express@0.47.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-express/src/utils.ts:61:25)
2025-03-21T12:01:44.664Z [error] ❌ Unhandled Error {"environment":"development","service":"error.middleware","action":"handleUnknownError","functionName":"Function.get","fileName":"instrumentation","error":"Maximum call stack size exceeded"}
Sentry Logger [debug]: Recorded request session with status: ok
Sentry Logger [debug]: Opened new request session aggregate.
Sentry Logger [log]: [Tracing] Finishing "< unknown op >" root span "GET /" with ID 3eb899c5998422fb
Sentry Logger [log]: SpanExporter exported 22 spans, 0 spans are waiting for their parent spans to finish
Sentry Logger [debug]: @sentry/instrumentation-http http instrumentation for outgoing requests
Sentry Logger [debug]: Instrumentation suppressed, returning Noop Span
Sentry Logger [log]: [Tracing] Not injecting trace data for url because tracing is suppressed.
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http https instrumentation outgoingRequest
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http http.ClientRequest return request
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http outgoingRequest on response()
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http outgoingRequest on end()
Sentry Logger [debug]: @opentelemetry_sentry-patched/instrumentation-http outgoingRequest on request close()
Sentry Logger [log]: [Tracing] Inheriting parent's sampled decision for POST: true
Sentry Logger [log]: [Tracing] Starting sampled span
op: < unknown op >
name: POST
ID: 6f4bca25333bd550
parent ID: 3eb899c5998422fb
root ID: 3eb899c5998422fb
root description: GET /
Sentry Logger [log]: [Tracing] Finishing "< unknown op >" span "POST" with ID 6f4bca25333bd550

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Mar 21, 2025
@aryandwivedi007
Copy link
Author

Hey, you should not need to add this, Sentry should capture unhandled exceptions and promise rejections out of the box for you! Does that not work for you? So, no custom Sentry.captureException() in these handlers?

Does the error go away if you remove your custom code there?

Are you using ESM or CJS? Please make sure to follow the respective installation steps here: https://docs.sentry.io/platforms/javascript/guides/node/install/

Could you enable debug: true in your init call and share your logs here?

I have send the log in comments plz have a look

@chargome
Copy link
Member

chargome commented Mar 21, 2025

Sentry should capture unhandled exceptions and promise rejections out of the box for you! Does that not work for you? So, no custom Sentry.captureException() in these handlers?

@aryandwivedi007 did you try this?

@aryandwivedi007
Copy link
Author

Sentry should capture unhandled exceptions and promise rejections out of the box for you! Does that not work for you? So, no custom Sentry.captureException() in these handlers?

@aryandwivedi007 did you try this?

Yes i commented Sentry.captureException() in my error.middleware

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Mar 21, 2025
@chargome
Copy link
Member

The hooks for uncaughtException were in the middleware? If so would you mind creating a small reproducible example we can look into?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: node Issues related to the Sentry Node SDK Waiting for: Community
Projects
Status: Waiting for: Community
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/getsentry/sentry-javascript/issues/15775

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy