reddit/baseplate.py

Rework wire-up of the core diagnostics observers

Closed this issue · 0 comments

This is pretty manual right now and we can simplify it as well. That potentially means easier upgrades for services down the line too.

    tracing_client = tracing_client_from_config(app_config)

    baseplate = Baseplate()
    baseplate.configure_logging()
    baseplate.configure_tracing(tracing_client)

could, e.g., become

    baseplate = Baseplate()
    baseplate.configure_observers(app_config)

where we automatically wire up the observers found in the config file.

The manual way should continue to exist for advanced use cases. This is just sugar.