Skip to content

yp2800/go-jaeger-trace

 
 

Repository files navigation

go-jaeger-trace

Start

$ docker-compose up -d

Run Server

$ go run server/main.go

Output:

2018/04/13 16:52:55 Initializing logging reporter
listening to port *:8080. press ctrl + c to cancel

Run Client

$ go run client/main.go

Output:

2018/04/13 16:52:57 Initializing logging reporter
2018/04/13 16:52:57 Reporting span 9ad925450ab9dba:420f7c605e0b8f01:6568e0797064c901:1
2018/04/13 16:52:57 {"message": "hello!"}
2018/04/13 16:52:57 Reporting span 9ad925450ab9dba:3019c48aa8106cf4:6568e0797064c901:1
2018/04/13 16:52:57 Reporting span 9ad925450ab9dba:6568e0797064c901:9ad925450ab9dba:1
2018/04/13 16:52:57 Reporting span 9ad925450ab9dba:9ad925450ab9dba:0:1

UI

Available at http://localhost:16686/. View registered services:

trace

The spans:

span

Stop

$ docker-compose down

Traefik

Traefik allows jaeger tracing too.

$ chmod +x traefik_darwin-amd64
$ sudo ./traefik --configFile=config/traefik.toml

Calling the traefik with go run client/main.go:

trace

Calling the traefik with go run plain-client/main.go:

notrace

About

Simple demo on OpenTracing with Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%