go-gin-api链路追踪验证docker方式部署
jaeger启动 docker run -d -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778 -p8085:16686 -p14268:14268 -p9411:9411 jaegertracing/all-in-one:latest go-gin-api启动 docker run -it -d --name goapilistenv1 --net=host opcache/busybox:goapilistenv1 docker run -it -d --name goapispeakv1 --net=host opcache/busybox:goapispeakv1 docker run -it -d --name goapireadv1 --net=host opcache/busybox:goapireadv1 docker run -it -d --name goapiwritev1 --net=host opcache/busybox:goapiwritev1 docker run -it -d --name goapisingv1 --net=host opcache/busybox:goapisingv1 docker run -it -d --name goginapiv1 --net=host opcache/busybox:goginapiv1
验证
curl http://127.0.0.1:9999/ping {"code":1,"msg":"pong","data":null} curl -X POST -d 'name=aaa' http://127.0.0.1:9999/product {"code":1,"msg":"success","data":null} curl -X POST -d 'name=admin' http://127.0.0.1:9999/product {"code":-1,"msg":"Key: 'ProductAdd.Name' Error:Field validation for 'Name' failed on the 'NameValid' tag","data":null} curl http://127.0.0.1:9999/test/md5 {"code":1,"msg":"1000000次 - 4.376381458s","data":null} curl http://127.0.0.1:9999/test/aes {"code":1,"msg":"1000000次 - 7.384191485s","data":null} curl http://127.0.0.1:9999/jaeger_test {"code":1,"msg":"[listen]-[speak-[listen]-[HttpGetOk]]-[read-[listen]-[HttpGetOk]]-[write-[listen]-[HttpGetOk]]-[HttpGetOk]","data":null}
请登录之后再进行评论