BloombergLP::balm::MetricsManager::setCategoryEnabled

Set whether the specified category is enabled to the optionally specified value. If a category is disabled it will not be published (see the publish methods), and higher level components may not record values for metrics belonging to the category (for an example, see the balm_metric documentation). The behavior is undefined unless category is a valid address of a category previously returned by the metric registry owned by this MetricManager object (i.e., metricRegistry()). Note that this operation is thread-safe, but not atomic: Other threads may simultaneously access the current enabled value for category while this operation is performed. Also note that this operation has linear performance with respect to the number of registered category holders for category (see balm_metricregistry and balm_category for information on category holders).

Synopsis

Declared in <balm_metricsmanager.h>

void
setCategoryEnabled(
    Category const* category,
    bool value = true);