deepflowio / deepflow

eBPF Observability - Distributed Tracing and Profiling
https://deepflow.io
Apache License 2.0
2.98k stars 333 forks source link

[QA] 如何提取响应 body 里的 status 字段判断响应是否错误,并聚合成指标 #8448

Closed airclear closed 2 weeks ago

airclear commented 2 weeks ago

我们的业务接口,根据响应 body 里的 status 字段来区分响应是否错误:

{"seqNum":"2624110500000002","data": {},"status":0}
{"seqNum":"2624110500000003","message":"系统错误","status":1}

请问,

1473371932 commented 2 weeks ago

根据你的提问,如果是基于http协议的应用,最好的方案还是写wasm,大致是: