DdRum addError message being ommited
维护者通常 2 天内回复
@marco-saia-datadog 已经在做这个了。
开始于 2025年11月24日。
评估
这个 Issue 还没有评估数据。
描述
Describe the bug
While using DdRum.addError to send errors to Datadog, under some conditions the error message is replaced by the stack trace.
From empirical testing, I noticed that these conditions happen when the stack trace parameter starts with some words and a colon. Then the error message is replaced with what's after the colon in the stack trace.
Reproduction steps
From the errors below, the only ones that I can see the error message on Datadog are the 2nd and 4th messages.
// Error stack will start with "Error:", so message is replaced with stack trace
try {
throw new Error("my test error 1");
} catch (e) {
void DdRum.addError(
"Error: my 1st message",
ErrorSource.CUSTOM,
(e as Error).stack ?? "empty stack",
{
a: 1,
}
);
}
// If a regular string is placed in the stack trace parameter, it works fine!
void DdRum.addError(
"Error: my 2nd message",
ErrorSource.CUSTOM,
"my 2nd stack info",
{
a: 2,
}
);
// If stack trace param has a colon, error message is replaced! Not exclusive for Error objects
void DdRum.addError(
"Error: my 3rd message",
ErrorSource.CUSTOM,
"Error: my 3rd stack info",
{
a: 3,
}
);
// Works fine if I add a linebreak before the stack trace (my current workaround)
try {
throw new Error("my test error 4");
} catch (e) {
void DdRum.addError(
"Error: my 4th message",
ErrorSource.CUSTOM,
"\n" + ((e as Error).stack ?? "empty stack"),
{
a: 4,
}
);
}
// Issue not exclusive to "Error:", any work preceding a colon will have the same effect
void DdRum.addError(
"Error: my 5th message",
ErrorSource.CUSTOM,
"ABCD: my 5th stack info",
{
a: 5,
}
);
SDK logs
No response
Expected behavior
No response
Affected SDK versions
2.4.0
Latest working SDK version
NA
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Yarn
React Native Version
0.73.6
Package.json Contents
"@datadog/mobile-react-native": "^2.4.0"
iOS Setup
No response
Android Setup
No response
Device Information
No response
Other relevant information
No response
- 主要语言
- TypeScript
- 星标
- 145
- 派生
- 65
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 20
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DataDog/dd-sdk-reactnative 的其他 Issue
-
bug
难度 3/5 1-2 天 新手友好度 62/100
DataDog/dd-sdk-reactnative#1486 · 3 条评论 ·
维护者通常 2 天内回复
-
Expose Android app startup Activity filtering in the React Native SDK可能已有人在做 @sbarrio 于 3 天前认领。 未关闭enhancement
难度 4/5 3-5 天 新手友好度 35/100
DataDog/dd-sdk-reactnative#1485 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
GraphQL variables with non-ASCII contents will make Apollo Client request throw error可能已有人在做 @cdn34dd 于 5 天前认领。 未关闭awaiting response bug
难度 4/5 3-5 天 新手友好度 42/100
DataDog/dd-sdk-reactnative#1482 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 2 天内回复
-
Interaction tracking records nothing: the babel plugin's injected import makes Metro bundle a second copy of the SDK, so DdBabelInteractionTracking.config is set on a different class than instrumented handlers call可能已有人在做 @cdn34dd 于 3 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
DataDog/dd-sdk-reactnative#1377 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 2 天内回复
-
Babel plugin emits untransformed JSX when a tracked component has .map() children, breaking the Hermes build可能已有人在做 @cdn34dd 于 3 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 76/100
DataDog/dd-sdk-reactnative#1353 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 DataDog/dd-sdk-reactnative 的全部 Issue
相似的 Issue
-
affected/v17 affected/v18 area/frontend type/bug
难度 2/5 1-3 小时 新手友好度 82/100
umbraco/Umbraco-CMS#24186 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
better-auth/better-auth#11723 · 1 个 reaction ·
维护者通常 1 天内回复
-
area: docs difficulty: easy documentation good first issue
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden ab可能已有人在做 @KajoVanBuyten 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 69/100
AgentSystemLabs/agent-office#367 ·
维护者通常 1 天内回复