diff options
author | Jorik Schellekens <joriksch@gmail.com> | 2019-07-23 15:46:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 15:46:04 +0100 |
commit | 3641784e8c63e1ac0deaa99519d53c0bf2853993 (patch) | |
tree | 9d37fbb50c2bb59e80d7fa285913a1146eb7e48f /synapse/logging | |
parent | Replace returnValue with return (#5736) (diff) | |
download | synapse-3641784e8c63e1ac0deaa99519d53c0bf2853993.tar.xz |
Make Jaeger fully configurable (#5694)
* Allow Jaeger to be configured * Update sample config
Diffstat (limited to 'synapse/logging')
-rw-r--r-- | synapse/logging/opentracing.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py index fb338ca223..d2c209c471 100644 --- a/synapse/logging/opentracing.py +++ b/synapse/logging/opentracing.py @@ -228,13 +228,16 @@ def init_tracer(config): # Include the worker name name = config.worker_name if config.worker_name else "master" + # Pull out the jaeger config if it was given. Otherwise set it to something sensible. + # See https://github.com/jaegertracing/jaeger-client-python/blob/master/jaeger_client/config.py + set_homeserver_whitelist(config.opentracer_whitelist) - jaeger_config = JaegerConfig( - config={"sampler": {"type": "const", "param": 1}, "logging": True}, + + JaegerConfig( + config=config.jaeger_config, service_name="{} {}".format(config.server_name, name), scope_manager=LogContextScopeManager(config), - ) - jaeger_config.initialize_tracer() + ).initialize_tracer() # Set up tags to be opentracing's tags global tags |