Zipkin tracing library for Go
Go Thrift
Latest commit 4468e7c May 26, 2016 @yanzay yanzay Merge pull request #5 from elodina/v2
V2
Permalink
Failed to load latest commit information.
avsc Go-Zipkin v2 work in progress, sample code will be provided to test o… Apr 11, 2016
gen-go/zipkincore
.gitignore
.travis.yml
LICENSE
README.md
kafka_collector.go Go-Zipkin v2 work in progress, sample code will be provided to test o… Apr 11, 2016
thrift.go
traceInfo.go
zipkin.go
zipkinCore.thrift

README.md

Build Status

Zipkin library for Go

This library focus is to provide maximum flexibility for creating Zipkin traces inside the distributed application. The library presumes the user is familiar with basic Zipkin concepts like annotations, spans, services, etc. Zipkin spans are composed in a stateless fashion. It is up to you how to manage span entities inside the application. Kafka is used as a transport to transfer the completed spans to Zipkin collector.

Quickstart

// ...
import (
    "github.com/elodina/go-zipkin"
)

rate := 10 // tracing rate 1 of 10
brokerAddr := []string{"master:5000"} // Kafka broker endpoint

producer, err := zipkin.DefaultProducer(brokerAddr) if err != nil {
//...
}

tracer := zipkin.NewTracer("ServiceName", rate, producer, zipkin.LocalNetworkIP(), zipkin.DefaultPort(), zipkin.DefaultTopic())

//...
span := tracer.NewSpan("span_name")
span.ServerReceive()
// do work here
span.ServerSendAndCollect()
//...

Examples

You may see the complete end-to-end example here: https://github.com/aShevc/go-zipkin-sample