getsentry / getsentry/sentry-javascript

No isolation scope forking for async background tasks

オープン
#19,596 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
Bug Nest.js
主要言語
TypeScript
スター
8.7k
フォーク
1.8k
平均マージ
1日 17時間
マージ済み PR(30日)
523

説明

We currently do not fork isolation scopes for async background tasks in nestjs. That's why any Sentry data generated during these tasks get written to the default isolation scope, which then gets forked during http requests. Therefore data generated during async activity leaks into http requests (see for instance [leaking breadcrumbs]()). We need to ensure that we properly isolate async background tasks.

Solution Brainstorm: We could try to find a single entrypoint but it would be good to write new instrumentations for the most important use cases here anyway (to also capture errors and do some tracing). For `@nestjs/event-emitter` we have instrumentation already, so we just need to add an isolation scope for other setups this is lacking (tracked in [JS-1895](https://linear.app/getsentry/issue/JS-1895/add-instrumentations-for-async-background-task-apis)).

[Reproduction](https://github.com/getsentry/repro/pull/23)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。