Easier way to add Sentry to libraries and plugins
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先检查所引用的 pay-with-flex.php 集成以及 SDK 对 Hub 和 Frame 的处理,然后查看默认集成如何获取其 hub 和 scope。将 client-stack 和 custom-hub 的思路与所述的隔离要求进行比较;当存在一种有文档记录且受支持的方式,使库或插件只能报告自身的错误,而不会接管宿主应用程序的 client 时,即可视为完成。
由索引模型根据 Issue 内容生成。
描述
Problem Statement
We want to be aware of when our customers run into problems with our plugin. The most straightforward way to do that is to add Sentry to our plugin:
https://github.com/JoinFlexHealth/woocommerce/blob/a0a66e8ebad2f8368a7f23ea7cd5a79985a104a3/pay-with-flex.php#L52-L222
However, this is a lot of code and it only actually works for exceptions/errors that are handled. We could register the global Sentry client, but we didn't want to takeover an existing client in the code base. Nor do we want to receive events for things that are outside of our control.
Solution Brainstorm
I had two different ideas here:
- It would be helpful if the Sentry global could accept a "stack" of clients. It looks like this is almost supported because
Hubsupports an array ofFrameinstances, each can have their own client. However, upon further inspection it doesn't look like that would actually work without adding/removing our client from the stack with each function call. I wish the Hub would just loop through all the clients in the stack and report the error to each unique client / DSN. That would also allow our client to be able to filter through all errors. - If you don't want to do that, another thing that would have been super helpful is allowing the default integrations to accept a custom hub/scope rather than the global one. I basically had to copy / re-implement a lot of the default integration code because the only way to use them is with the global instance.
- 主要语言
- PHP
- 星标
- 1.9k
- 派生
- 475
- 平均合并
- 4 天 7 小时
- 30 天内合并 PR
- 43
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry-php 的其他 Issue
-
Improvement PHP
难度 2/5 1-3 小时 新手友好度 70/100
getsentry/sentry-php#2243 · 4 条评论 ·
维护者通常 3 天内回复
-
Implement Global Attributes可能已有人在做 @Litarnus 于 2 天前认领。 未关闭PHP
getsentry/sentry-php#2238 · 1 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
Support for Continuous Profiling可能已有人在做 @Litarnus 于 2 天前认领。 未关闭PHP
getsentry/sentry-php#2237 · 1 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
PHP 8.6 Support可能已有人在做 @Litarnus 于 5 天前认领。 未关闭PHP
getsentry/sentry-php#2231 · 1 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
-
Add span streaming support可能已有人在做 @Litarnus 于 5 天前认领。 未关闭PHP Span First
getsentry/sentry-php#2229 · 1 条评论 · 已指派 1 人 ·
维护者通常 3 天内回复
查看 getsentry/sentry-php 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
coollabsio/shoutrrr#190 ·
-
Bug Enhancement Performance
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Feature Status: Needs Triage
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
frontend low-priority
难度 2/5 1-3 小时 新手友好度 77/100
mplodowski/dynamicpdf-plugin#336 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
AdvancedCustomFields/acf#1044 ·