Skip to content

waterandair/opentracing-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go 语言的 openTracing 实践指南(译自: https://github.com/yurishkuro/opentracing-tutorial)

Tracing 统一翻译为链路追踪

目录

代码说明

随着文章一步步走的代码在 ./lesson0x/exercise 目录下,封装好的最终代码在 ./lesson0x/solution

安装 Jaeger

这篇指南使用 CNCF 基金会的 Jaeger(https://jaegertracing.io) 作为后端链路追踪系统,我们需要通过 Docker 启动一个默认内存存储的 Jaeger系统,只暴露必须的端口,并且将log模式设置为 debug。 docker pull jaegertracing/all-in-one:1.13

docker run \
  --rm \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 16686:16686 \
  jaegertracing/all-in-one:1.13 \
  --log-level=debug

此外, 可以从 https://jaegertracing.io/download/ 下载不同平台的名为 all-in-one Jaeger二进制执行程序,Jaeger启动后,可以 通过 http://localhost:16686 访问 Jaeger UI`.

运行项目示例

本仓库使用 go modules管理依赖,所以要求 GO 版本大于 1.11。
首先将代码克隆到 $GOPATH 路径下

mkdir -p $GOPATH/src/github.com/waterandair/
cd $GOPATH/src/github.com/waterandair/
git clone https://github.com/waterandair/opentracing-tutorial.git

然后, 安装依赖:

cd $GOPATH/src/github.com/waterandair/opentracing-tutorial/
make install

本教程的其他命令都相对于此目录运行

About

opentracing 的 go 语言实践指南

Resources

Stars

Watchers

Forks

Packages

No packages published