Node stack parser splits anonymous frames at ` (` inside the file path (`C:\Program Files (x86)\...`, `My App (beta)/...`)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 76/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- node.js, typescript
- 領域
- backend, observability
研究方向
閱讀packages/core/src/utils/node-stack-trace.ts並檢查FULL_MATCH;報告也指出,瀏覽器解析器chromeStackLineParser會進行相同的拆分。使用提供的匿名 V8 frame 重現問題,這些 frame 的檔案路徑包含 (,並檢查兩個解析器。完成標準是這些 frame 保留完整檔名並被解析為匿名 frame,同時具名 frame 仍能正確解析。
由索引模型根據 Issue 內容生成。
描述
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
11.11.0 (also develop 6c6c040256)
Framework Version
Node.js v26.13.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
/home/me/My App (beta)/index.js:
const { defaultStackParser } = require("@sentry/node");
try {
[1].forEach(() => {
throw new Error("boom");
});
} catch (err) {
console.log(err.stack.split("\n")[1]);
const top = defaultStackParser(err.stack).pop();
console.log(top.filename, "|", top.function, top.lineno, top.colno);
}
Steps to Reproduce
Run node index.js from a directory whose path contains a space followed by (. The same happens for any anonymous V8 frame such as at C:\Program Files (x86)\MyApp\index.js:2:9 or at async /home/me/My App (beta)/index.js:2:9.
Expected Result
at /home/me/My App (beta)/index.js:4:11
/home/me/My App (beta)/index.js | ? 4 11
Actual Result
at /home/me/My App (beta)/index.js:4:11
beta)/index.js | /home/me/My App 4 11
Parsing at C:\Program Files (x86)\MyApp\index.js:2:9 returns {"function":"C:\\Program Files","filename":"x86)\\MyApp\\index.js","in_app":false}. Named frames (at main (/home/me/My App (beta)/index.js:5:3)) are parsed as expected.
Additional Context
FULL_MATCH in packages/core/src/utils/node-stack-trace.ts is /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; the optional lazy (.+?)\s+\( function-name group matches up to the first ( in the path even when the line has no name ( prefix. The truncated filename no longer starts with / or a Windows drive letter, so filenameIsInApp also returns false, and source map lookup and code context fail for these frames. The browser chromeStackLineParser shows the same split for Node-style frames.
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Credit: https://ucsbplse.github.io/
- 主要語言
- TypeScript
- 星號
- 8.8k
- 分支
- 1.9k
- 平均合併
- 1 天 21 小時
- 30 天內合併 PR
- 637
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-javascript 的其他 Issue
-
Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 76/100
getsentry/sentry-javascript#26203 · 1 則留言 ·
維護者通常 1 天內回覆
-
Workers AI integration drops output of non-streaming chat responses in the OpenAI format (`choices`)可能已有人在做 @andreiborza 於 1 天前認領。 未關閉Bug Cloudflare Workers Spans Waiting for: Product Owner
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-javascript#26120 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Only create Nuxt database and storage spans when there is a parent span可能已有人在做 @nicohrubec 於 9 天前認領。 未關閉Improvement Nuxt
難度 2/5 1-3 小時 新手友好度 83/100
getsentry/sentry-javascript#25805 · 3 則留言 ·
維護者通常 1 天內回覆
-
Only create Cloudflare storage and D1 db spans when there is a parent span可能已有人在做 @nicohrubec 於 9 天前認領。 未關閉Cloudflare Workers Improvement Spans
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-javascript#25804 · 1 則留言 ·
維護者通常 1 天內回覆
-
Only create aws-sdk DynamoDB db spans when there is a parent span可能已有人在做 @nicohrubec 於 9 天前認領。 未關閉Bug javascript
難度 2/5 1-3 小時 新手友好度 76/100
getsentry/sentry-javascript#25801 · 1 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 getsentry/sentry-javascript 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
bytedance/flowgram.ai#1235 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
devswha/herdr-web-ui#3325 ·
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
-
desktop v3 windows
難度 2/5 1-3 小時 新手友好度 75/100
esengine/DeepSeek-Reasonix#15016 · 1 則留言 ·
維護者通常 1 天內回覆