chuan-yun / Molten

php probe for zipkin and opentracing
Apache License 2.0
793 stars 160 forks source link

cli和fpm无法上报数据 #89

Closed ClaytonXia closed 6 years ago

ClaytonXia commented 6 years ago

分别在ubuntu16.04(php7.0 + libcurl4-openssl-dev)和centos7.0(php5.4+libcurl-devel)上使用。

  1. cli跟fpm无法上报数据,但是手动curl到zipkin可以提交, molten配置如下:

selection_013

curl 命令如下:

curl -XPOST -d '[{"traceId":"458205cf740e0c50","name":"php_curl","version":"php-4","id":"8392a113229f1719","parentId":"a660298e1c373957","timestamp":1531715586011587,"duration":4238,"annotations":[{"value":"cs","timestamp":1531715586011587,"endpoint":{"serviceName":"php7","ipv4":"192.168.8.124"}},{"value":"cr","timestamp":1531715586015825,"endpoint":{"serviceName":"php7","ipv4":"192.168.8.124"}}],"binaryAnnotations":[{"key":"http.url","value":"http:\/\/localhost:12345\/","endpoint":{"serviceName":"php7","ipv4":"192.168.8.124"}},{"key":"error","value":"Failed to connect to localhost port 12345: Connection refused","endpoint":{"serviceName":"php7","ipv4":"192.168.8.124"}}]},{"traceId":"458205cf740e0c50","name":"cli","version":"php-4","id":"a660298e1c373957","timestamp":1531715586011516,"duration":4331,"annotations":[{"value":"sr","timestamp":1531715586011516,"endpoint":{"serviceName":"php7","ipv4":"192.168.8.124"}},{"value":"ss","timestamp":1531715586015847,"endpoint":{"serviceName":"php7","ipv4":"192.168.8.124"}}],"binaryAnnotations":[{"key":"path","value":"-","endpoint":{"serviceName":"php7","ipv4":"192.168.8.124"}}]}]' http://127.0.0.1:9411/api/v1/spans -H "content-type: application/json"