'Globals acts as a container for objects available throughout
the life of the application.
One instance of Globals is created by Pylons during
application initialization and is available during requests
via the \'g\' variable.
``config``
The PylonsConfig object passed in from ``config/environment.py``
``global_conf``
The same variable used throughout ``config/middleware.py``
namely, the variables from the ``[DEFAULT]`` section of the
configuration file.
``app_conf``
The same ``kw`` dictionary used throughout
``config/middleware.py`` namely, the variables from the
section in the config file for your application.
``extra``
The configuration returned from ``load_config`` in
``config/middleware.py`` which may be of use in the setup of
your global variables.'

def __init__(self, config, global_conf, app_conf, paths, **extra):

    global_conf.setdefault('debug', False)
    reload(site)
    self.pkg_resources_working_set = pkg_resources.WorkingSet()
    self.config = ConfigValueParser(global_conf)
    self.config.add_spec(self.spec)
    self.plugins = PluginLoader(self.pkg_resources_working_set, self.config.get('plugins', []))
    self.stats = Stats(self.config.get('statsd_addr'), self.config.get('statsd_sample_rate'))
    self.startup_timer = self.stats.get_timer('app_startup')
    self.startup_timer.start()
    self.baseplate = Baseplate()
    self.baseplate.configure_logging()
    self.baseplate.register(R2BaseplateObserver())
    self.baseplate.configure_tracing(service_name='r2', tracing_endpoint=self.config.get('tracing_endpoint'), sample_rate=self.config.get('tracing_sample_rate'))
    self.paths = paths
    self.running_as_script = global_conf.get('running_as_script', False)
    self.lang = getattr(self, 'site_lang', 'en')
    (self.languages, self.lang_name) = get_active_langs(config, default_lang=self.lang)
    all_languages = self.lang_name.keys()
    all_languages.sort()
    self.all_languages = all_languages
    tz = global_conf.get('timezone', 'UTC')
    self.tz = pytz.timezone(tz)
    dtz = global_conf.get('display_timezone', tz)
    self.display_tz = pytz.timezone(dtz)
    self.startup_timer.intermediate('init')
