getsentry/sentry-javascript

[NestJS] Leaking breadcrumbs

Opened this issue · 3 comments

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nestjs

SDK Version

^10.2.0

Framework Version

10.x

Link to Sentry event

No response

Reproduction Example/SDK Setup

The customer is seeing breadcrumbs from clearly unrelated, earlier requests (minutes before) appear on current events. This suggests request isolation isn’t working as expected.

Steps to Reproduce

We’re seeing very long breadcrumb histories in a NestJS service — breadcrumbs from clearly unrelated, earlier requests (minutes before) appear on current events. This suggests request isolation isn’t working as expected.

  • They verified that Sentry is imported first
  • They Implemented a custom NestJS middleware that starts a new isolation context at the beginning of each request. This seems to resolve the issue.

Expected Result

The SDK should do the isolation automatically

Actual Result

Breadcrumbs are not isolated properly

Additional Context

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

👋 @dalnoki

Could you please ask them to set debug: true in their Sentry.init and paste startup logs?

Hey @andreiborza - please find the logs and additional details attached in Linear!