Awesome Open Source
Awesome Open Source


Travis CI GoDoc Go Report Card Sourcegraph

OpenTracing bridge for the native Zipkin tracing implementation Zipkin Go.


This package is a simple bridge to allow OpenTracing API consumers to use Zipkin as their tracing backend. For details on how to work with spans and traces we suggest looking at the documentation and README from the OpenTracing API.

For developers interested in adding Zipkin tracing to their Go services we suggest looking at Go kit which is an excellent toolkit to instrument your distributed system with Zipkin and much more with clean separation of domains like transport, middleware / instrumentation and business logic.


Please check the zipkin-go package for information how to set-up the Zipkin Go native tracer. Once set-up you can simple call the Wrap function to create the OpenTracing compatible bridge.

import (
	zipkinhttp ""
	zipkinot ""

func main() {
	// bootstrap your app...
	// zipkin / opentracing specific stuff
		// set up a span reporter
		reporter := zipkinhttp.NewReporter("http://zipkinhost:9411/api/v2/spans")
		defer reporter.Close()
		// create our local service endpoint
		endpoint, err := zipkin.NewEndpoint("myService", "")
		if err != nil {
			log.Fatalf("unable to create local endpoint: %+v\n", err)

		// initialize our tracer
		nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
		if err != nil {
			log.Fatalf("unable to create tracer: %+v\n", err)

		// use zipkin-go-opentracing to wrap our tracer
		tracer := zipkinot.Wrap(nativeTracer)
		// optionally set as Global OpenTracing tracer instance
	// do other bootstrapping stuff...

For more information on zipkin-go-opentracing, please see the documentation at go doc.

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Golang (164,291
Bridge (6,483
Tracing (3,590
Instrumentation (1,825
Zipkin (985
Opentracing (712
Distributed Tracing (326
Go Kit (93
Openzipkin (63