helloeveroneday opened a new issue #928: span trace信息无法正常传递,麻烦确认tls_bls.rpcz_parent_span用法是否正确 URL: https://github.com/apache/incubator-brpc/issues/928 **Describe the bug (描述bug)** span的trace id在请求时,无法跨服务传递。首次请求时大概率出现。 **To Reproduce (复现方法)** 使用curl请求 brpc http服务A,A收到请求后使用brpc标准同步接口调用B服务。curl请求时带trace id信息。在span.cpp SpanDB::Index函数中新增 trace信息输出,未能正常输出。 **Expected behavior (期望行为)** A服务 B服务均正常获取 trace id。可正常打印trace信息。 **Versions (各种版本)** OS: 16.04.11 Compiler: gcc version 5.4.0 brpc: master protobuf: **Additional context/screenshots (更多上下文/截图)** ![1](https://user-images.githubusercontent.com/4447116/65308159-096d3f80-dbbc-11e9-946b-bc0f0c5af766.png) **推测的原因**是src/brpc/span.h中tls_bls.rpcz_parent_span用法有问题。 看起来tls_bls正常情况需要同步给bthread中bthread::tls_task_group的current_task()->local_storage。切换bthread后 local_storage同步回tls_bls。 但**span中的 tls_bls.rpcz_parent_span 未见同步给bthread local_storage**。 麻烦确认是否是此原因导致span trace信息无法正常传递。
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org