package tracing provides Dapper-style request tracing to services.
Request tracing is a fundamental building block for large distributed applications. It's instrumental in understanding request flows, identifying hot spots, and diagnosing errors. All microservice infrastructures will benefit from request tracing; sufficiently large infrastructures will require it.
Zipkin is one of the most used OSS distributed tracing platforms available
with support for many different languages and frameworks. Go kit provides
bindings to the native Go tracing implementation zipkin-go. If using Zipkin
with Go kit in a polyglot microservices environment, this is the preferred
binding to use. Instrumentation exists for
kit/transport/grpc. The bindings are highlighted in the addsvc example. For
more information regarding Zipkin feel free to visit Zipkin's Gitter.
Go kit supports transport and endpoint middlewares for the OpenCensus instrumentation library. OpenCensus provides a cross language consistent data model and instrumentation libraries for tracing and metrics. From this data model it allows exports to various tracing and metrics backends including but not limited to Zipkin, Prometheus, Stackdriver Trace & Monitoring, Jaeger, AWS X-Ray and Datadog. Go kit uses the opencensus-go implementation to power its middlewares.
Go kit supports the OpenTracing API and uses the opentracing-go package to
provide tracing middlewares for its servers and clients. Currently OpenTracing
instrumentation exists for
Since OpenTracing is an effort to provide a generic API, Go kit should support a multitude of tracing backends. If a Tracer implementation or OpenTracing bridge in Go for your back-end exists, it should work out of the box.
Please note that the "world view" of existing tracing systems do differ. OpenTracing can not guarantee you that tracing alignment is perfect in a microservice environment especially one which is not exclusively OpenTracing enabled or switching from one tracing backend to another truly entails just a change in configuration.
The following tracing back-ends are known to work with Go kit through the OpenTracing interface and are highlighted in the addsvc example.
OpenTelemetry came to life as a result of merging OpenCensus and OpenTracing. Go kit instrumentation can be found in opentelemetry-go-contrib which is a central repository of instrumentation libraries.
Package tracing provides helpers and bindings for distributed tracing.
As your infrastructure grows, it becomes important to be able to trace a request, as it travels through multiple services and back to the user. Package tracing provides endpoints and transport helpers and middlewares to capture and emit request-scoped information.
Package opencensus provides Go kit integration to the OpenCensus project.
|Package opencensus provides Go kit integration to the OpenCensus project.|
Package opentracing provides Go kit integration to the OpenTracing project.
|Package opentracing provides Go kit integration to the OpenTracing project.|
Package zipkin provides Go kit integration to the OpenZipkin project through the use of zipkin-go, the official OpenZipkin tracer implementation for Go.
|Package zipkin provides Go kit integration to the OpenZipkin project through the use of zipkin-go, the official OpenZipkin tracer implementation for Go.|