Skip to content

yusufsyaifudin/go-opentracing-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opentracing Example

First, clone this repo in your $GOPATH/github.com/yusufsyaifudin.

After that, inside the directory $GOPATH/github.com/yusufsyaifudin/go-opentracing-example run:

$ docker-compose up -d #this will run the Jaeger service
$ make run #this will run the example server in port 1323

Then use the CURL:

curl -I -X GET 'http://localhost:1323/dora-the-explorer?is_rainy_day=true' 

You'll get the response like this:

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Uber-Trace-Id: 1f43f36f2edd33ed:1f43f36f2edd33ed:0:1
Date: Sat, 08 Dec 2018 06:01:54 GMT
Content-Length: 54

There, as you can see there is a header Uber-Trace-Id and you can get the trace info in Jaeger using following URL: http://localhost:16686/trace/1f43f36f2edd33ed