forked-synapse/synapse/config
Jorik Schellekens 38a6d3eea7
Add basic opentracing support (#5544)
* Configure and initialise tracer

Includes config options for the tracer and sets up JaegerClient.

* Scope manager using LogContexts

We piggy-back our tracer scopes by using log context.
The current log context gives us the current scope. If new scope is
created we create a stack of scopes in the context.

* jaeger is a dependency now

* Carrier inject and extraction for Twisted Headers

* Trace federation requests on the way in and out.

The span is created in _started_processing and closed in
_finished_processing because we need a meaningful log context.

* Create logcontext for new scope.

Instead of having a stack of scopes in a logcontext we create a new
context for a new scope if the current logcontext already has a scope.

* Remove scope from logcontext if logcontext is top level

* Disable tracer if not configured

* typo

* Remove dependence on jaeger internals

* bools

* Set service name

* :Explicitely state that the tracer is disabled

* Black is the new black

* Newsfile

* Code style

* Use the new config setup.

* Generate config.

* Copyright

* Rename config to opentracing

* Remove user whitelisting

* Empty whitelist by default

* User ConfigError instead of RuntimeError

* Use isinstance

* Use tag constants for opentracing.

* Remove debug comment and no need to explicitely record error

* Two errors a "s(c)entry"

* Docstrings!

* Remove debugging brainslip

* Homeserver Whitlisting

* Better opentracing config comment

* linting

* Inclue worker name in service_name

* Make opentracing an optional dependency

* Neater config retreival

* Clean up dummy tags

* Instantiate tracing as object instead of global class

* Inlcude opentracing as a homeserver member.

* Thread opentracing to the request level

* Reference opetnracing through hs

* Instantiate dummy opentracin g for tests.

* About to revert, just keeping the unfinished changes just in case

* Revert back to global state, commit number:

9ce4a3d9067bf9889b86c360c05ac88618b85c4f

* Use class level methods in tracerutils

* Start and stop requests spans in a place where we
have access to the authenticated entity

* Seen it, isort it

* Make sure to close the active span.

* I'm getting black and blue from this.

* Logger formatting

Co-Authored-By: Erik Johnston <erik@matrix.org>

* Outdated comment

* Import opentracing at the top

* Return a contextmanager

* Start tracing client requests from the servlet

* Return noop context manager if not tracing

* Explicitely say that these are federation requests

* Include servlet name in client requests

* Use context manager

* Move opentracing to logging/

* Seen it, isort it again!

* Ignore twisted return exceptions on context exit

* Escape the scope

* Scopes should be entered to make them useful.

* Nicer decorator names

* Just one init, init?

* Don't need to close something that isn't open

* Docs make you smarter
2019-07-11 10:36:03 +01:00
..
__init__.py ConsentResource to gather policy consent from users 2018-05-15 15:11:59 +01:00
__main__.py Fix synapse.config.__main__ on python 3 (#4356) 2019-01-08 10:03:09 +11:00
_base.py Add "--open-private-ports" cmdline option 2019-06-24 14:15:34 +01:00
api.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
appservice.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
captcha.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
cas.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
consent_config.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
database.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
emailconfig.py Make errors about email password resets much clearer (#5616) 2019-07-05 10:44:12 +01:00
groups.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
homeserver.py Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
jwt_config.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
key.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
logger.py Move logging utilities out of the side drawer of util/ and into logging/ (#5606) 2019-07-04 00:07:04 +10:00
metrics.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
password_auth_providers.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
password.py Added possibilty to disable local password authentication (#5092) 2019-06-27 18:37:29 +01:00
push.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
ratelimiting.py Fixes to the federation rate limiter (#5621) 2019-07-05 11:10:19 +01:00
registration.py Remove support for invite_3pid_guest. (#5625) 2019-07-05 16:47:58 +01:00
repository.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
room_directory.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
saml2_config.py cleanups 2019-06-27 00:37:41 +01:00
server_notices_config.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
server.py Merge pull request #5524 from matrix-org/rav/new_cmdline_options 2019-06-24 17:25:57 +01:00
spam_checker.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
stats.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
third_party_event_rules.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
tls.py Update the TLS cipher string and provide configurability for TLS on outgoing federation (#5550) 2019-06-28 18:19:09 +10:00
tracer.py Add basic opentracing support (#5544) 2019-07-11 10:36:03 +01:00
user_directory.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
voip.py Don't load the generated config as the default. 2019-06-24 14:14:52 +01:00
workers.py Pass config_dir_path and data_dir_path into Config.read_config. (#5522) 2019-06-24 11:34:45 +01:00