我目前正在使用zipkin,我正在尝试构建一个python脚本来提取保存的数据,并对它们进行不同的处理。
zipkin日志和UI运行良好。
我已经这样做了:
start = 1505754933996
end = 1505758533996
url = "http://zipkin.iamplus.xyz/?serviceName=" + service + "&spanName=all&startTs=" + str(start) + "&endTs=" + str(end) + "&minDuration=&limit=&annotationQuery=&sortOrder=duration-desc"
print(url)
#response = wget.download(url)
response = requests.get(url)我使用了wget和request,这两个命令都给出了如下结果:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Webpack App</title>
<link href="/app-0993bcc28157df364901.min.css" rel="stylesheet"></head>
<body>
<script type="text/javascript" src="/app-0993bcc28157df364901.min.js"></script></body>
</html>但是,如果我在web浏览器中复制粘贴请求或wget中使用的URL,结果会显示出来
你知道如何为Zipkin服务器提取JSON或任何其他格式的数据吗?
谢谢
发布于 2017-09-19 07:30:28
Zipkin UI向API发出AJAX请求,以便检索显示的数据。您可以在以下位置找到zipkin的API定义:
https://github.com/openzipkin/zipkin-api
我相信你正在寻找网址:http://zipkin.iamplus.xyz/api/v1/traces
从那里您将获得与您的过滤器匹配的轨迹
https://stackoverflow.com/questions/46287877
复制相似问题