bootstrap(_:)
bootstrap
is an one-time configuration function which globally selects the desired metrics backend implementation. bootstrap
can be called at maximum once in any given program, calling it more than once will lead to undefined behavior, most likely a crash.
static func bootstrap(_ factory: MetricsFactory)
Parameters
- factory
A factory that given an identifier produces instances of metrics handlers such as
CounterHandler
,RecorderHandler
andTimerHandler
.