Metric constructor

const Metric(
  1. String _name,
  2. MetricType type,
  3. List<List<int>> value, {
  4. String? host,
  5. int? interval,
  6. String? prefix,
  7. Set<String>? tags,
})

Implementation

const Metric(
  String _name,
  this.type,
  this.value, {
  this.host,
  this.interval,
  this.prefix,
  this.tags,
})  : assert(
        type != MetricType.gauge || interval == null,
        '`interval` is only applicable for `count` and `rate`',
      ),
      name = prefix == null ? _name : '$prefix.$_name';