How to use the inspector-csv.CsvMetricReporter function in inspector-csv

To help you get started, we’ve selected a few inspector-csv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rstiller / inspector-metrics / examples / express4-multi-process-js / src / metrics.js View on Github external
async function csvReporter (registry, tags) {
  const {
    CsvMetricReporter,
    DefaultCsvFileWriter
  } = require('inspector-csv')

  const reporter = new CsvMetricReporter({
    columns: ['date', 'group', 'name', 'field', 'type', 'value', 'tags'],
    log: null,
    minReportingTimeout: 30,
    reportInterval: 5000,
    writer: new DefaultCsvFileWriter({})
  })

  reporter.setTags(tags)
  reporter.addMetricRegistry(registry)

  await reporter.start()

  return reporter
}

inspector-csv

CSV metric reporter for nodejs

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis