@@ -39,29 +39,29 @@ module.exports = function normalizeConfig(userConfig = {}) {
3939/**
4040 * @param {import('../types/collector').CollectorConfig } userConfig
4141 * @param {{ agentHost: string } } defaultConfig
42- * @returns {string }
4342 */
4443function normalizeAgentHost ( userConfig , defaultConfig ) {
45- return util . resolveStringConfig ( {
44+ const result = util . resolveStringConfig ( {
4645 envVar : 'INSTANA_AGENT_HOST' ,
4746 configValue : userConfig . agentHost ,
4847 defaultValue : defaultConfig . agentHost ,
4948 configPath : 'config.agentHost'
50- } ) . resolvedConfigValue ;
49+ } ) ;
50+ return result . resolvedConfigValue ;
5151}
5252
5353/**
5454 * @param {import('../types/collector').CollectorConfig } userConfig
5555 * @param {{ agentPort: number } } defaultConfig
56- * @returns {number }
5756 */
5857function normalizeAgentPort ( userConfig , defaultConfig ) {
59- return util . resolveNumericConfig ( {
58+ const result = util . resolveNumericConfig ( {
6059 envVar : 'INSTANA_AGENT_PORT' ,
6160 configValue : userConfig . agentPort ,
6261 defaultValue : defaultConfig . agentPort ,
6362 configPath : 'config.agentPort'
64- } ) . resolvedConfigValue ;
63+ } ) ;
64+ return result . resolvedConfigValue ;
6565}
6666
6767/**
@@ -70,12 +70,13 @@ function normalizeAgentPort(userConfig, defaultConfig) {
7070 * @returns {number }
7171 */
7272function normalizeAgentRequestTimeout ( userConfig , defaultConfig ) {
73- return util . resolveNumericConfig ( {
73+ const result = util . resolveNumericConfig ( {
7474 envVar : 'INSTANA_AGENT_REQUEST_TIMEOUT' ,
7575 configValue : userConfig . agentRequestTimeout ,
7676 defaultValue : defaultConfig . agentRequestTimeout ,
7777 configPath : 'config.agentRequestTimeout'
78- } ) . resolvedConfigValue ;
78+ } ) ;
79+ return result . resolvedConfigValue ;
7980}
8081
8182/**
@@ -84,12 +85,13 @@ function normalizeAgentRequestTimeout(userConfig, defaultConfig) {
8485 * @returns {boolean }
8586 */
8687function normalizeAutoProfile ( userConfig , defaultConfig ) {
87- return util . resolveBooleanConfig ( {
88+ const result = util . resolveBooleanConfig ( {
8889 envVar : 'INSTANA_AUTO_PROFILE' ,
8990 configValue : userConfig . autoProfile ,
9091 defaultValue : defaultConfig . autoProfile ,
9192 configPath : 'config.autoProfile'
92- } ) . resolvedConfigValue ;
93+ } ) ;
94+ return result . resolvedConfigValue ;
9395}
9496
9597/**
0 commit comments