Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add basic opentracing support #5544
I've set up opentracing for synapse. The configuration options as they stand ignore the whitelists. This is coming later. Jaeger comes with a bunch of config options but I assume we don't want to expose them.
I've written a custom scope manager which keeps a track of the currently active span in opentracing. This scope manager ties in with logcontexts where we generally create a new logcontext for each new scope. There is an exception to this when the current log context has no scope. In this case the scope is simply attached to the context and detached again on close. Otherwise the lifetime of a scope and it's logcontext are exactly the same. (This goes against what we discussed @erikjohnston but opening a new context with the scope in site.py (line 239) causes the logcontext to be dropped prematurely. If anyone sees a nicer way shout.)
@@ Coverage Diff @@ ## develop #5544 +/- ## =========================================== - Coverage 63.25% 63.19% -0.07% =========================================== Files 328 331 +3 Lines 35854 36046 +192 Branches 5911 5934 +23 =========================================== + Hits 22681 22778 +97 - Misses 11548 11637 +89 - Partials 1625 1631 +6