Skip to content

Commit

Permalink
OpenTracing zipKin Support. Reference - Issue #429
Browse files Browse the repository at this point in the history
Co-authored-by: Kristina Fischer <Kristina.Fischer@target.com>
Co-authored-by: Michael Murphy <Michael.Murphy@target.com>
Co-authored-by: Nathan West <nathan.west@target.com>
Co-authored-by: Austin Hartzheim <Austin.Hartzheim@target.com>
Co-authored-by: Jacob Hansen <Jacob.Hansen@target.com>
  • Loading branch information
6 people committed Mar 20, 2018
1 parent 6845629 commit 1c17541
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ func newHTTPProxy(cfg *config.Config) http.Handler {
}
return t
},
Requests: metrics.DefaultRegistry.GetTimer("requests"),
Noroute: metrics.DefaultRegistry.GetCounter("notfound"),
Logger: l,
TracerCfg: cfg.Tracing,
Requests: metrics.DefaultRegistry.GetTimer("requests"),
Noroute: metrics.DefaultRegistry.GetCounter("notfound"),
Logger: l,
TracerCfg: cfg.Tracing,
}
}

Expand Down
3 changes: 1 addition & 2 deletions proxy/http_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ import (
"github.com/fabiolb/fabio/noroute"
"github.com/fabiolb/fabio/proxy/gzip"
"github.com/fabiolb/fabio/route"
"github.com/fabiolb/fabio/uuid"
"github.com/fabiolb/fabio/trace"

"github.com/fabiolb/fabio/uuid"
)

// HTTPProxy is a dynamic reverse proxy for HTTP and HTTPS protocols.
Expand Down
4 changes: 2 additions & 2 deletions trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"

opentracing "github.com/opentracing/opentracing-go"
zipkin "github.com/openzipkin/zipkin-go-opentracing"
"github.com/opentracing/opentracing-go/ext"
zipkin "github.com/openzipkin/zipkin-go-opentracing"
)

func InjectHeaders(span opentracing.Span, req *http.Request) {
Expand Down Expand Up @@ -90,4 +90,4 @@ func InitializeTracer(collectorType string, connectString string, serviceName st
log.Printf("\n\nTRACER: %v\n\n", tracer)
log.Printf("\n\nCOLLECTOR: %v\n\n", collector)
log.Printf("\n\nRECORDER: %v\n\n", recorder)
}
}
2 changes: 1 addition & 1 deletion trace/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package trace

import (
opentracing "github.com/opentracing/opentracing-go"
mocktracer "github.com/opentracing/opentracing-go/mocktracer"
"github.com/opentracing/opentracing-go/ext"
mocktracer "github.com/opentracing/opentracing-go/mocktracer"
"net/http"
"testing"
)
Expand Down

0 comments on commit 1c17541

Please sign in to comment.