package tracing
package tracing
provides Dapper-style request tracing to services.
An implementation exists for Zipkin; Appdash support is planned.
Rationale
TODO
Usage
Wrap a server.Endpoint so that it emits traces to a Zipkin collector.
func main() {
var (
myHost = "instance01.addsvc.internal.net"
myMethod = "ADD"
scribeHost = "scribe.internal.net"
timeout = 50 * time.Millisecond
batchSize = 100
batchInterval = 3 * time.Second
)
spanFunc := zipkin.NewSpanFunc(myHost, myMethod)
collector, _ := zipkin.NewScribeCollector(scribeHost, timeout, batchSize, batchInterval)
var e server.Endpoint
e = makeEndpoint() // for your service
e = zipkin.AnnotateEndpoint(spanFunc, collector)
serve(e)
}