1、Zipkin的由来sql
2、什么是ZipKin数据库
curl http://localhost:9411/api/v2/trace/2e0d4019eb7aae31
curl http://localhost:9411/api/v2/services
[ { "traceId": "string", // 追踪链路ID "name": "string", // span名称,通常为方法名称 "parentId": "string", // 调用者ID "id": "string", // spanID "kind": "CLIENT", // 替代zipkin v1的注解中的四个核心状态,详细介绍见下文 "timestamp": 0, // 时间戳,调用时间 "duration": 0, // 持续时间-调用的服务所消耗的时间 "debug": true, "shared": true, "localEndpoint": { // 本地网络节点上下文 "serviceName": "string", "ipv4": "string", "ipv6": "string", "port": 0 }, "remoteEndpoint": { // 远端网络节点上下文 "serviceName": "string", "ipv4": "string", "ipv6": "string", "port": 0 }, "annotations": [ // value一般是缩写代码,对应的时间戳表示代码标记事件的时间 { "timestamp": 0, "value": "string" } ], "tags": { // span的上下文信息,好比:http.method、http.path "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" } } ]
cqlsh 172.10.0.5
cqlsh> describe keyspaces;
cqlsh> use zipkin2;
cqlsh> describe tables;
#查询前得对查询列创建索引 cqlsh:zipkin2> create index on span(trace_id); cqlsh:zipkin2> select * from trace_by_service_span where trace_id='f81a638649326474';