tracing/

directory
v0.0.0-...-6080588 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2015 License: MIT

README

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)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL