Skip to content

basvanbeek/ocsql-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ocsql-example

Example showing how to use ocsql the OpenCensus driver wrapper for database/sql.

zipkin

This demo uses Zipkin as the tracing backend as it is very easy to set-up. See the Zipkin quickstart

usage

A typical way to see the example in action:

# run Zipkin from official docker image
docker run -d -p 9411:9411 openzipkin/zipkin

# build the server application
go build cmd/svc/svc.go

# start the service
./svc

Open your favorite web browser and try these URL's

# valid
http://localhost:8080/user/1/items
http://localhost:8080/user/2/items

# not found
http://localhost:8080/user/100/items

# bad param
http://localhost:8080/user/INVALID_USER_ID/items

If all is well you should be able to see some generated spans at http://localhost:9411

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages