Skip to content
Snippets Groups Projects
Unverified Commit a8251da1 authored by Jorik Schellekens's avatar Jorik Schellekens Committed by GitHub
Browse files

Blow up config if opentracing is missing (#5985)

* Blow up config if opentracing is missing
parent f1b40694
No related branches found
No related tags found
No related merge requests found
Check at setup that opentracing is installed if it's enabled in the config.
......@@ -13,6 +13,8 @@
# 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
......@@ -32,6 +34,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", [])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment