nginx-opentracing 简单使用

nginx 的日常的应用开发中占比还是比较高的,opentracing 是一个分布式追踪标准
相应是开源实现也比较多。nginx-opentracing 是一个opentracing nginx 的插件,让我们可以
方便的进行服务的性能追踪,查看服务调用依赖

例子使用官方demo,运行使用docker-compose

项目准备

git clone https://github.com/opentracing-contrib/nginx-opentracing.git

构建demo项目

cd nginx-opentracing/example/trivial/jaeger
docker-compose build
docker-compose up -d

效果

  • jaeger 界面

  • 请求
curl localhost:8080

说明

nginx-opentracing 支持的分布式追踪的工具还是比较多的,通过简单的配置,我们就能实现一些基本的性能分析。

参考资料

https://github.com/opentracing-contrib/nginx-opentracing

原文地址:https://www.cnblogs.com/rongfengliang/p/9752800.html