Molten icon indicating copy to clipboard operation
Molten copied to clipboard

zipkin v2 span格式错误

Open ljx211520 opened this issue 6 years ago • 1 comments

官网给的span格式是: [{"id":"c74c9ec8df3438ef","name":"parse_request","traceId":"c74c9ec8df3438ef","parentId":null,"timestamp":1544001763263682,"duration":997908,"debug":false,"localEndpoint":{"serviceName":"frontend","ipv4":"127.0.0.1","port":2555},"kind":"SERVER"},{"id":"8b2d97e3845a8553","name":"users:get_list","traceId":"c74c9ec8df3438ef","parentId":"c74c9ec8df3438ef","timestamp":1544001763271961,"duration":989222,"debug":false,"localEndpoint":{"serviceName":"frontend","ipv4":"127.0.0.1","port":2555},"kind":"CLIENT","annotations":[{"value":"request_started","timestamp":1544001763386374},{"value":"request_finished","timestamp":1544001764260415}]}]

扩展返回的span格式是: [{"traceId":"14107ba10ab393fa","name":"file_put_contents","version":"php-4","kind":"CLIENT","id":"806bdf8a1c3cd035","parentId":"380feb49a11d4e4c","timestampMicros":1543998288769505,"durationMicros":691,"localEndpoint":{"serviceName":"file_put_contents","ipv4":"127.0.0.1"},"remoteEndpoint":[],"tags":{"file.path":"/Users/abc/wwwroot/test/molten.log"}},{"traceId":"14107ba10ab393fa","name":"cli","version":"php-4","kind":"SERVER","id":"380feb49a11d4e4c","timestampMicros":1543998288763037,"durationMicros":7582,"localEndpoint":{"serviceName":"cli","ipv4":"127.0.0.1"},"remoteEndpoint":[],"tags":{"path":"/Users/looksky/wwwroot/test/response.php"}}]

timestamp和duration 参数名不一样,上报数据的时候报 Cannot decode spans

ljx211520 avatar Dec 05 '18 09:12 ljx211520

@ljx211520 官方的是v1 格式, 扩展中v2格式进行设置的。

silkcutKs avatar Dec 06 '18 09:12 silkcutKs