Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

tracing: fix Setup function #2064

Merged
merged 1 commit into from
Jan 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ type Options struct {

func Setup(o Options) {
if !o.Enabled {
log.Info("Enabling opentracing")
Enabled = true
Closer = initTracer(o.Endpoint, o.Name)
return
}

log.Info("Enabling opentracing")
Enabled = true
Closer = initTracer(o.Endpoint, o.Name)
}

func initTracer(endpoint, svc string) (closer io.Closer) {
Expand Down