Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
}
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
}