New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 自定义开发wasm 遇见的几个问题 #6163
Comments
1 导致 painc 原因如下: 代码中些问题,比如下面这里如果还没赋值,可能会导致 panic。建议将错误处理完善一下,目前 wasm 插件发生 panic 会 trap 且无法捕获,所以需要自己预防一下 panic。 |
生成的 request id 不知道哪里生成出来的,原因如下:我们是无插桩的,也不会凭空生成一个 request id,需要检查一下代码中有没有赋值的位置。 |
exception 不省心,需要检查一下对应设置。 这个我们代码是没有设置OK,所以为了排查我们把response.Exception的值写到了属性里面的Exception,来做比较。看我上面的截图就发现Exception: error-, 但是 grafana上面显示的还是Ok |
panic 不会被捕获,会直接 trap,所以还是要预防一下 panic |
你好,我确认了一下,response_exception 确实是从插件赋值的。所以 grafana 里查到的 response_exception 应该是和 attributes 里的一致,是否 grafana 的 query 有改动呢? |
Search before asking
DeepFlow Component
Agent
What you expected to happen
1 wasn_instance: "tx_wasm" wasm on http resp fail: vm call on_http_resp fail: error while executing at wasm backtrace:
0: memory fault at wasm address 0x18828a4 in linear memory of size 0x1000000
1: wasm trap: out of bounds memory acces
加上_ "github.com/wasilibs/nottinygc"后,报了新错误:wasn_instance: "tx_wasm" wasm on http resp fail: vm call on_http_resp fail: error while executing at wasm backtrace:
2 wasn_instance: "tx_wasm" wasm on http resp fail: vm call on_http_resp fail: error while executing at wasm backtrace:
3 采集到的body 是缺失的,有的是没有采集到body,有的是采集的json 不全
4 采集到的trace id 在grafana 上,根据查询条件查询不出来
5 这里生成的request id 不知道哪里生成出来的
6 Exception 的值设置不省心,都是OK
How to reproduce
No response
DeepFlow version
agent :6.3.8
server : 基于6.2.5 二次开发
DeepFlow agent list
No response
Kubernetes CNI
No response
Operation-System/Kernel version
No response
Anything else
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: