MCPcopy Create free account
hub / github.com/StackStorm/st2 / metrics_initialize

Function metrics_initialize

st2common/st2common/metrics/base.py:221–234  ·  view source on GitHub ↗

Initialize metrics constant

()

Source from the content-addressed store, hash-verified

219
220
221def metrics_initialize():
222 """
223 Initialize metrics constant
224 """
225 global METRICS
226
227 try:
228 METRICS = get_plugin_instance(PLUGIN_NAMESPACE, cfg.CONF.metrics.driver)
229 except (NoMatches, MultipleMatches, NoSuchOptError) as error:
230 raise PluginLoadError(
231 "Error loading metrics driver. Check configuration: %s" % error
232 )
233
234 return METRICS
235
236
237def get_driver():

Callers 2

setupFunction · 0.90
get_driverFunction · 0.85

Calls 2

get_plugin_instanceFunction · 0.90
PluginLoadErrorClass · 0.90

Tested by

no test coverage detected