* scollectd::add_polled_metric(typ, [<metric var> | scollectd::make_typed(<data_type>, <metric_var>) [, ...]);
*
* Where
- * <pluginname> would be the overall 'module', e.g. "cpu"
- * <instance_name> -> optional distinguisher between plugin instances. For cpu, the built-in
+ * `<pluginname>` would be the overall 'module', e.g. "cpu"
+ * `<instance_name>` -> optional distinguisher between plugin instances. For cpu, the built-in
* scollectd::per_cpu_plugin_instance constant is a good choice, i.e. 0->N cpu.
* If there are no instances (e.g. only one), empty constant is appropriate (none)
- * <type_name> is the 'type' of metric collected, for ex. "usage" (cpu/0/usage)
- * <type_instance> is a distinguisher for metric parts of the type, e.g. "idle", "user", "kernel"
+ * `<type_name>` is the 'type' of metric collected, for ex. "usage" (cpu/0/usage)
+ * `<type_instance>` is a distinguisher for metric parts of the type, e.g. "idle", "user", "kernel"
* -> cpu/0/usage/idle | cpu/0/usage/user | cpu/0/usage/kernel
*
* Each type instance can bind an arbitrary number of values, ech representing some aspect in turn of the instance.
truncate(_type, "type");
truncate(_type_instance, "type_instance");
}
- type_instance_id(const seastar::metrics::impl::metric_id &id) : _plugin(id.group_name()),
- _plugin_instance(id.instance_id()), _type(id.inherit_type()),
+ type_instance_id(const seastar::metrics::impl::metric_id &id, const type_id& inherit_type) : _plugin(id.group_name()),
+ _plugin_instance(id.instance_id()), _type(inherit_type),
_type_instance(id.name()) {
}
type_instance_id(type_instance_id &&) = default;
template<typename Arg>
[[deprecated("Use the metrics layer")]] static type_instance_id add_polled_metric(const type_instance_id & id, description d,
Arg&& arg, bool enabled = true) {
- namespace sm = seastar::metrics::impl;
-
- seastar::metrics::impl::get_local_impl()->add_registration(to_metrics_id(id), arg.type, sm::make_function(arg.value, arg.type), d, enabled);
+ seastar::metrics::impl::get_local_impl()->add_registration(to_metrics_id(id), arg.type, seastar::metrics::impl::make_function(arg.value, arg.type), d, enabled);
return id;
}
/*!