分布式追踪与Kubernetes入门指南
1. 分布式追踪测试
1.1 显示追踪头信息
若要在日志输出中显示追踪头信息,可按以下步骤操作:
1. 配置文件中已有两行代码,但被注释掉了,其前有如下注释:
# To see tracing headers, uncomment the following two lines and restart
the product-composite service
- 在配置文件中找到上述注释,并取消其下方两行代码的注释。
- 重启
product-composite服务:
docker-compose restart product-composite
- 显示
product-composite服务的日志输出:
docker-compose log -f --tail 0 product-composite
- 重新运行之前的
curl请求,日志输出中将包含traceparentHTTP头。例如,向推荐服务发送的请求:
超级会员免费看
订阅专栏 解锁全文
32

被折叠的 条评论
为什么被折叠?



