dd-trace-api
Version:
An API for dd-trace, the Datadog APM library for Node.js.
25 lines (18 loc) • 437 B
JavaScript
const Module = require('module')
const requireCache = Module._cache
Module._cache = {}
const dc = require('dc-polyfill')
const channelNames = []
dc.channel = (name) => {
if (name.startsWith('datadog-api')) {
channelNames.push(name)
}
return {
publish: () => {},
hasSubscribers: false
}
}
require('../../index')
Module._cache = requireCache
module.exports = Array.from(new Set(channelNames)).sort()