dd-trace
Version:
Datadog APM tracing client for JavaScript
30 lines (26 loc) • 684 B
JavaScript
const os = require('os')
const OS_PLATFORM = 'os.platform'
const OS_VERSION = 'os.version'
const OS_ARCHITECTURE = 'os.architecture'
const RUNTIME_NAME = 'runtime.name'
const RUNTIME_VERSION = 'runtime.version'
const DD_HOST_CPU_COUNT = '_dd.host.vcpu_count'
function getRuntimeAndOSMetadata () {
return {
[]: process.version,
[]: process.arch,
[]: process.platform,
[]: 'node',
[]: os.release(),
[]: os.cpus().length
}
}
module.exports = {
getRuntimeAndOSMetadata,
OS_PLATFORM,
OS_VERSION,
OS_ARCHITECTURE,
RUNTIME_NAME,
RUNTIME_VERSION,
DD_HOST_CPU_COUNT
}