Handle zipkin collector creation

This commit is contained in:
ferhat elmas 2018-02-15 10:28:03 +01:00 committed by Traefiker Bot
parent 83a92596c3
commit 5212b7d3bd

View file

@ -21,6 +21,9 @@ type Config struct {
// Setup sets up the tracer
func (c *Config) Setup(serviceName string) (opentracing.Tracer, io.Closer, error) {
collector, err := zipkin.NewHTTPCollector(c.HTTPEndpoint)
if err != nil {
return nil, nil, err
}
recorder := zipkin.NewRecorder(collector, c.Debug, "0.0.0.0:0", serviceName)
tracer, err := zipkin.NewTracer(
recorder,