diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-10-18 18:34:42 +0100 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-10-18 18:34:42 +0100 |
commit | 36adfaedabf2ef1f36ebabe2d086a068df707ee8 (patch) | |
tree | b0f66b58a38181d343f17f2c4000ad85ce949fb1 /synapse/config/tracer.py | |
parent | fix doc strings (diff) | |
parent | Merge branch 'uhoreg/e2e_cross-signing_merged' into develop (diff) | |
download | synapse-36adfaedabf2ef1f36ebabe2d086a068df707ee8.tar.xz |
Merge branch 'develop' into cross-signing_sig_upload
Diffstat (limited to 'synapse/config/tracer.py')
-rw-r--r-- | synapse/config/tracer.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/config/tracer.py b/synapse/config/tracer.py index 95e7ccb3a3..8be1346113 100644 --- a/synapse/config/tracer.py +++ b/synapse/config/tracer.py @@ -13,10 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +from synapse.python_dependencies import DependencyException, check_requirements + from ._base import Config, ConfigError class TracerConfig(Config): + section = "tracing" + def read_config(self, config, **kwargs): opentracing_config = config.get("opentracing") if opentracing_config is None: @@ -32,6 +36,11 @@ class TracerConfig(Config): if not self.opentracer_enabled: return + try: + check_requirements("opentracing") + except DependencyException as e: + raise ConfigError(e.message) + # The tracer is enabled so sanitize the config self.opentracer_whitelist = opentracing_config.get("homeserver_whitelist", []) |