code: function (metric) {
        metric.workerId = workerId
        metric.pid = process.pid
        if (!metric.sct) {
          if (metric.name && /collectd/.test(metric.name)) {
            metric.sct = 'OS'
          } else {
            metric.sct = 'APP'
          }
        }
        if (!metric.ts) {
          metric.ts = new Date().getTime()
        }
        if (!metric.type) {
          metric.type = this.defaultType
        }
        if (!metric.filters && metric.type === 'njs') {
          metric.filters = this.defaultFilters()
        }
        metric.spmLine = this.formatLine(metric)
        this.emit('metric', metric)
        if (metric.name) {
          this.emit(metric.name, metric)
        }
      }
docs: Adds a metric value and emits event to listeners on 'metric' or metric.name
  @param metric