Open
Conversation
lhx077
requested changes
Mar 12, 2026
lhx077
reviewed
Mar 12, 2026
LinQingYuu
reviewed
Mar 12, 2026
Member
LinQingYuu
left a comment
There was a problem hiding this comment.
也许可以考虑有选择性的上报
像一些 IOException 还有 HTTP 请求超时其实没有上报的必要,报这个纯粹在浪费钱
实际上 Sentry 上是分了 Debug 和 Release 环境的,它也支持记录 Debug 等级的日志
Member
Author
|
现在我们需要一个明确的、不应该上报的异常类型列表,例如 当然如果要做按关键词过滤也不是不行但是我觉得势必会比较屎 orz |
ruattd
requested changes
Mar 13, 2026
b545c25 to
fe7aa62
Compare
lhx077
previously requested changes
Mar 14, 2026
| options.AutoSessionTracking = true; | ||
| options.Release = release; | ||
| options.Environment = environment; | ||
| options.SetBeforeSend(@event => |
Contributor
There was a problem hiding this comment.
@event.Exception 可能为 null(message/event 类型、或异常在 @event.Exceptions 列表里),这段逻辑可能根本过滤不到你想过滤的 timeout。
仅通过 Level == Debug 丢弃也未必等同于你想要的策略:你在 ReportException 里会把 Info/Warning 也送过去;但 LogService 现在对“任何带 Exception 的日志”都会调用上报,因此 Sentry 可能被 Warning/Info 异常大量污染。
lhx077
reviewed
Mar 14, 2026
Contributor
|
对了,我觉得我有必要再解释一下昨天那个回复: 我就说这么多 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本 PR 对遥测服务与日志服务进行了改动,使用 Sentry 收集启动器上报的环境信息与错误。
在启用遥测后,Sentry 将会自动收集程序启动后出现的错误与环境信息,并将其上报至服务器。程序自行收集的环境信息也会被一并包含在收集到的错误内上报。
需要添加一个新的环境变量:
SENTRY_DSN用于配置 Sentry SDK 使用的后端。在不配置SENTRY_DSN或未勾选启用遥测数据收集设置项的情况下,遥测服务不会上报任何数据。遥测服务现在具有一个新的方法:
ReportException(ex),用于在需要的地方进行调用以上报启动器错误供开发者调查、复现与修复。参见:
Note
这个 PR 和目前所使用的 Sentry 实例配置可能还不是很完善,如果有任何建议欢迎提出,也欢迎直接向
feat/sentry-telemetry分支提交你的更改。Sentry 实例的访问权限请各位开发联系 @Big-Cake-jpg 提供邮箱获取注册邮件。