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 帧重现问题,这些帧的文件路径包含 (,并检查两个解析器。完成标准是这些帧保留完整文件名并被解析为匿名帧,同时命名帧仍能正确解析。
由索引模型根据 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 天内回复