INNER CODE UNIT · Python
get_metrics_provider
linkedin/iris · src/iris/metrics/__init__.py:15
def get_metrics_provider(config, app_name):
return import_custom_module('iris.metrics', config['metrics'])(config, app_name)
def emit():
if metrics_provider:
metrics_provider.send_metrics(stats)
stats.update(stats_reset)
# It's expected that you gevent.spawn this after you monkeypatch everything
def emit_forever():
while True:
emit()
sleep(60)
def init(config, app_name, default_stats):