Skip to content

test(observability): add reproducible signal captures - #1155

Merged
Alanxtl merged 5 commits into
apache:mainfrom
AsperforMias:feature/3767-observability-capture
Oct 27, 2026
Merged

Alanxtl merged 5 commits into
apache:mainfrom
AsperforMias:feature/3767-observability-capture

Conversation

@AsperforMias

@AsperforMias AsperforMias commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extend the existing observability example with repeatable capture of raw metrics, OTLP spans and context logs. Validate both sides' counts, trace fields and parent IDs, and CtxLogger output with valid, absent and invalid contexts.

Use a non-empty group/version and pin the SDK to merged commit e4aabaf27773; the previous pin includes the group/version in rpc.service. Other dependency versions stay unchanged.

Refs apache/dubbo-go#3767.

Validation

  • Five actual CLIENT/SERVER pairs; both sides record 5 requests, 4 successes and 1 business failure. Trace parent IDs, error status and context logs are checked.
  • Nine offline checks pass, including malformed captures. Integration Go tests and the existing helper race tests pass.
  • The checked-in capture preserves a runtime mismatch: consumer service.name identifies the client, but metric application_name identifies the provider. The strict check exits 1 and reports it. Admin pages were not tested.

With a temporary module replacement pointing to runtime commit b2e79b0f, the same live capture passes every strict check, including consumer application alignment.

The runtime fix is apache/dubbo-go#3770. After that fix merges, update the sample SDK pin and regenerate the capture to complete consumer field alignment.

Comment thread .licenserc.yaml Resolved
provider.log and consumer.log are capture.py output and already match
the repository *.log ignore. Offline tests rebuild those lines from
traces.jsonl. The license ignore for jsonl files is **/*.jsonl.
Keep the parent READMEs to the capture commands, saved files, and a
pointer at the checked-in snapshot. Field checks, the exit-1 mismatch,
and the SDK pin stay in capture/README.md.
@AsperforMias

Copy link
Copy Markdown
Contributor Author

这个ci红跟go升版至1.27有关,protocol/jsonrpc/json.go:218 的 type req *serverRequest会在此版本go下出现问题。go v1.27 把 encoding/json 换成了 v2 实现(https://go.dev/doc/go1.27)。然后用 v1.27 编译时,jsonrpc 服务端收到任何请求都会直接崩,而且 recover 承受不住。triple 和 dubbo 协议不受影响。

这个 Build And Integration 失败和这个pr无关,它挂在 rpc/multi-protocols,那时这个pr的样例还没开始run

主要的问题是apache/skywalking-eyes/header@main 开始安装 Go 1.27(apache/skywalking-eyes@7f98a36a),并且把它留在了 PATH 里,导致集成测试用的是 Go 1.27.3,而不是 go.mod 声明的版本,我们的go.mod和集测的版本左右互搏了。Go 1.27 的 encoding/json 改成了基于 v2 实现,dubbo-go 里 protocol/jsonrpc/json.go 的 type req *serverRequest 写法在这个版本下会无限递归,jsonrpc provider 直接栈溢出崩溃(见 golang/go#75361)

修复:

等 #1156 合入后我会再次 rebase 该pr。

@AsperforMias

Copy link
Copy Markdown
Contributor Author

这里不是我后面的改动烂ci了,是ci用的外部工具在中间换了go版本,排了半天ai速查了下这个神秘问题

10/15 第一次提交时,CI 里 "Check license header" 这一步用的 skywalking-eyes/header@main 装的还是 Go 1.25,所以集成测试也用 1.25 跑,是绿的。10/18 skywalking-eyes 在自己的 main 上把 Go 写死成了 1.27。因为 samples 引用的是 @main、没钉版本,从那以后每次跑 CI 都会装上 1.27,并且留在 PATH 里,后面的集成测试就变成了用 1.27 跑。而 dubbo-go 的 jsonrpc 在 1.27 下会栈溢出,rpc/multi-protocols 就挂了。

@Alanxtl Alanxtl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对应的pr我都合并了 看一下ci结果吧

@Alanxtl
Alanxtl merged commit 9c2a11a into apache:main Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants