Skip to content

Commit

Permalink
Merge pull request #3325 from weaveworks/trace-context-detect
Browse files Browse the repository at this point in the history
Add middleware to detect jaeger trace context over HTTP
  • Loading branch information
bboreham authored Aug 28, 2018
2 parents 2215e66 + 67b887c commit 4e08ea0
Show file tree
Hide file tree
Showing 8 changed files with 1,081 additions and 91 deletions.
14 changes: 9 additions & 5 deletions prog/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ func router(collector app.Collector, controlRouter app.ControlRouter, pipeRouter
uiHandler))
router.PathPrefix("/").Name("static").Handler(uiHandler)

instrument := middleware.Instrument{
RouteMatcher: router,
Duration: requestDuration,
}
return instrument.Wrap(router)
middlewares := middleware.Merge(
middleware.Instrument{
RouteMatcher: router,
Duration: requestDuration,
},
middleware.Tracer{},
)

return middlewares.Wrap(router)
}

func collectorFactory(userIDer multitenant.UserIDer, collectorURL, s3URL, natsHostname string,
Expand Down
Loading

0 comments on commit 4e08ea0

Please sign in to comment.