@beincom/node-profile
Version:
``` npm install @beincom/node-profile # yarn add @beincom/node-profile ```
27 lines • 1.2 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.processConfig = void 0;
function processConfig(config, env) {
const processedConfig = {
appName: config.appName ?? env.appName,
authToken: config.authToken ?? env.authToken,
flushIntervalMs: config.flushIntervalMs ?? env.flushIntervalMs,
heap: {
samplingIntervalBytes: config.heap?.samplingIntervalBytes ?? env.heapSamplingIntervalBytes,
stackDepth: config.heap?.stackDepth ?? env.heapStackDepth,
},
serverAddress: env.adhocServerAddress ?? config.serverAddress ?? env.serverAddress,
tags: config.tags,
wall: {
samplingDurationMs: config.wall?.samplingDurationMs ?? env.wallSamplingDurationMs,
samplingIntervalMicros: config.wall?.samplingIntervalMicros ?? env.wallSamplingIntervalMicros,
},
sourceMapper: config.sourceMapper,
basicAuthUser: config.basicAuthUser,
basicAuthPassword: config.basicAuthPassword,
tenantID: config.tenantID,
};
return processedConfig;
}
exports.processConfig = processConfig;
//# sourceMappingURL=process-config.js.map